Merge pull request #3446 from brenttheisen/rsync_auto_nothing_to_watch_pr

command/rsync-auto: message and exit rsync-auto immediately if there is nothing to watch.
This commit is contained in:
Mitchell Hashimoto 2014-04-11 14:53:42 -07:00
commit 75bc1c74b6
2 changed files with 9 additions and 0 deletions

View File

@ -70,6 +70,13 @@ module VagrantPlugins
end
end
# Exit immediately if there is nothing to watch
if paths.empty?
@logger.warn("No paths to listen for so exiting")
@env.ui.info(I18n.t("vagrant.rsync_auto_no_paths"))
return 1
end
# Output to the user what paths we'll be watching
paths.keys.sort.each do |path|
paths[path].each do |path_opts|

View File

@ -158,6 +158,8 @@ en:
Running cleanup tasks for '%{name}' provisioner...
rsync_auto_initial: |-
Doing an initial rsync...
rsync_auto_no_paths: |-
No paths to watch
rsync_auto_path: |-
Watching: %{path}
rsync_communicator_not_ready: |-