diff --git a/lib/vagrant-vcloud/action/sync_folders.rb b/lib/vagrant-vcloud/action/sync_folders.rb index 8357cba..053342a 100644 --- a/lib/vagrant-vcloud/action/sync_folders.rb +++ b/lib/vagrant-vcloud/action/sync_folders.rb @@ -83,12 +83,16 @@ def call(env) env[:machine].communicate.sudo("mkdir -p '#{guestpath}'") env[:machine].communicate.sudo( "chown #{ssh_info[:username]} '#{guestpath}'") + + # Since Vagrant 1.4 the private key path may be an array + ssh_key_paths = ssh_info[:private_key_path].is_a?(Array) ? ssh_info[:private_key_path] : [ ssh_info[:private_key_path] ] + ssh_keys = ssh_key_paths.map {|p| "-i '#{p}'"}.join(" ") # Rsync over to the guest path using the SSH info command = [ "rsync", "--verbose", "--archive", "-z", "--exclude", ".vagrant/", "--exclude", "Vagrantfile", - "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no -i '#{ssh_info[:private_key_path]}'", + "-e", "ssh -p #{ssh_info[:port]} -o StrictHostKeyChecking=no #{ssh_keys}", hostpath, "#{ssh_info[:username]}@#{ssh_info[:host]}:#{guestpath}"] @@ -110,4 +114,4 @@ def call(env) end end end -end \ No newline at end of file +end diff --git a/lib/vagrant-vcloud/version.rb b/lib/vagrant-vcloud/version.rb index 64795e5..84cdf61 100644 --- a/lib/vagrant-vcloud/version.rb +++ b/lib/vagrant-vcloud/version.rb @@ -1,5 +1,5 @@ module VagrantPlugins module VCloud - VERSION = "0.1.1" + VERSION = "0.1.2" end end