synced_folders/rsync-auto: don't crash if rsync command fails [GH-4991]
This commit is contained in:
parent
7e61afd480
commit
9596b7a46c
|
@ -191,6 +191,10 @@ module VagrantPlugins
|
||||||
# halt is happening. Just notify the user but don't fail out.
|
# halt is happening. Just notify the user but don't fail out.
|
||||||
opts[:machine].ui.error(I18n.t(
|
opts[:machine].ui.error(I18n.t(
|
||||||
"vagrant.rsync_communicator_not_ready_callback"))
|
"vagrant.rsync_communicator_not_ready_callback"))
|
||||||
|
rescue Vagrant::Errors::RSyncError => e
|
||||||
|
# Error executing rsync, so show an error
|
||||||
|
opts[:machine].ui.error(I18n.t(
|
||||||
|
"vagrant.rsync_auto_rsync_error", message: e.to_s))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -204,6 +204,12 @@ en:
|
||||||
have specified `rsync_auto` to be false.
|
have specified `rsync_auto` to be false.
|
||||||
rsync_auto_path: |-
|
rsync_auto_path: |-
|
||||||
Watching: %{path}
|
Watching: %{path}
|
||||||
|
rsync_auto_rsync_error: |-
|
||||||
|
There was an error while executing rsync. The error is shown below.
|
||||||
|
This may not be critical since rsync sometimes fails, but if this message
|
||||||
|
repeats, then please fix the issue:
|
||||||
|
|
||||||
|
%{message}
|
||||||
rsync_communicator_not_ready: |-
|
rsync_communicator_not_ready: |-
|
||||||
The machine is reporting that it is not ready for rsync to
|
The machine is reporting that it is not ready for rsync to
|
||||||
communicate with it. Verify that this machine is properly running.
|
communicate with it. Verify that this machine is properly running.
|
||||||
|
|
Loading…
Reference in New Issue