diff --git a/plugins/synced_folders/rsync/command/rsync_auto.rb b/plugins/synced_folders/rsync/command/rsync_auto.rb index b2a4adc0b..d66747ffa 100644 --- a/plugins/synced_folders/rsync/command/rsync_auto.rb +++ b/plugins/synced_folders/rsync/command/rsync_auto.rb @@ -191,6 +191,10 @@ module VagrantPlugins # halt is happening. Just notify the user but don't fail out. opts[:machine].ui.error(I18n.t( "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 diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 894251945..b8c91aa64 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -204,6 +204,12 @@ en: have specified `rsync_auto` to be false. rsync_auto_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: |- The machine is reporting that it is not ready for rsync to communicate with it. Verify that this machine is properly running.