Skip to content
This repository was archived by the owner on Feb 11, 2022. It is now read-only.

Commit 114e10e

Browse files
committed
Skip folder sync and print a warning if rsync is missing.
1 parent 34eea41 commit 114e10e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lib/vagrant-aws/action/sync_folders.rb

+7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
require "vagrant/util/scoped_hash_override"
66

7+
require "vagrant/util/which"
8+
79
module VagrantPlugins
810
module AWS
911
module Action
@@ -28,6 +30,11 @@ def call(env)
2830
# Ignore disabled shared folders
2931
next if data[:disabled]
3032

33+
unless Vagrant::Util::Which.which('rsync')
34+
env[:ui].warn(I18n.t('vagrant_aws.rsync_not_found_warning'))
35+
break
36+
end
37+
3138
hostpath = File.expand_path(data[:hostpath], env[:root_path])
3239

3340
#rsync interprets paths with colons as remote locations.

locales/en.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ en:
1616
Instance is not created. Please run `vagrant up` first.
1717
ready: |-
1818
Machine is booted and ready for use!
19+
rsync_not_found_warning: |-
20+
Warning! Folder sync disabled because the rsync binary is missing.
21+
Make sure rsync is installed and the binary can be found in the PATH.
1922
rsync_folder: |-
2023
Rsyncing folder: %{hostpath} => %{guestpath}
2124
terminating: |-

0 commit comments

Comments
 (0)