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:
commit
75bc1c74b6
|
@ -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|
|
||||
|
|
|
@ -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: |-
|
||||
|
|
Loading…
Reference in New Issue