Now checks if `unison` binary is installed before running
This commit is contained in:
parent
e8fd57fbbb
commit
47403e16cc
|
@ -57,10 +57,10 @@ module Vagrant
|
|||
def setup_unison
|
||||
return if unison_folders.empty?
|
||||
|
||||
logger.info "Setting up unison crontab..."
|
||||
runner.ssh.execute do |ssh|
|
||||
runner.system.prepare_unison(ssh)
|
||||
|
||||
logger.info "Creating unison crontab entries..."
|
||||
unison_folders.each do |name, data|
|
||||
runner.system.create_unison(ssh, data)
|
||||
end
|
||||
|
|
|
@ -53,6 +53,8 @@ module Vagrant
|
|||
end
|
||||
|
||||
def prepare_unison(ssh)
|
||||
ssh.exec!("which unison", :error_key => :unison_not_found)
|
||||
|
||||
logger.info "Preparing system for unison sync..."
|
||||
vm.ssh.upload!(StringIO.new(TemplateRenderer.render('/unison/script')), config.unison.script)
|
||||
ssh.exec!("sudo chmod +x #{config.unison.script}")
|
||||
|
|
|
@ -212,6 +212,11 @@
|
|||
:system_unspecified: |-
|
||||
A VM system type must be specified! This is done via the `config.vm.system`
|
||||
configuration value. Please read the documentation online for more information.
|
||||
:unison_not_found: |-
|
||||
The `unison` binary was not found on the guest machine. This is required
|
||||
for folder syncing via unison. Please install unison on your system to
|
||||
use folder syncing. You may also disable folder syncing, install unison,
|
||||
re-enable syncing, then call a `vagrant reload` to enable syncing.
|
||||
:unknown_vm: |-
|
||||
The specified VM could not be found: <%= vm %>
|
||||
:virtualbox_import_failure: |-
|
||||
|
|
Loading…
Reference in New Issue