diff --git a/plugins/synced_folders/rsync/synced_folder.rb b/plugins/synced_folders/rsync/synced_folder.rb index c75c610d8..b0bf13877 100644 --- a/plugins/synced_folders/rsync/synced_folder.rb +++ b/plugins/synced_folders/rsync/synced_folder.rb @@ -50,7 +50,7 @@ module VagrantPlugins # Exclude some files by default, and any that might be configured # by the user. excludes = ['.vagrant/'] - excludes += Array(opts[:exclude]) if opts[:exclude] + excludes += Array(opts[:exclude]).map(&:to_s) if opts[:exclude] excludes.uniq! # Build up the actual command to execute @@ -71,6 +71,10 @@ module VagrantPlugins machine.ui.info(I18n.t( "vagrant.rsync_folder", guestpath: guestpath, hostpath: hostpath)) + if excludes.length > 1 + machine.ui.info(I18n.t( + "vagrant.rsync_folder_excludes", excludes: excludes.inspect)) + end # If we have tasks to do before rsyncing, do those. if machine.guest.capability?(:rsync_pre) diff --git a/templates/locales/en.yml b/templates/locales/en.yml index 0d0b23e9c..39463f7b9 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -82,6 +82,7 @@ en: Running cleanup tasks for '%{name}' provisioner... rsync_folder: |- Rsyncing folder: %{hostpath} => %{guestpath} + rsync_folder_excludes: " - Exclude: %{excludes}" ssh_exec_password: |- The machine you're attempting to SSH into is configured to use password-based authentication. Vagrant can't script entering the