Merge pull request #7012 from penguincoder/rsync-command-quoting

translate windows path
This commit is contained in:
Seth Vargo 2016-07-18 22:05:39 -04:00 committed by GitHub
commit 8a5cf3b81a
1 changed files with 6 additions and 4 deletions

View File

@ -74,14 +74,16 @@ module VagrantPlugins
# Create the path for the control sockets. We used to do this
# in the machine data dir but this can result in paths that are
# too long for unix domain sockets.
controlpath = File.join(Dir.tmpdir, "ssh.#{rand(1000)}")
control_options = ""
unless Vagrant::Util::Platform.windows?
controlpath = File.join(Dir.tmpdir, "ssh.#{rand(1000)}")
control_options = "-o ControlMaster=auto -o ControlPath=#{controlpath} -o ControlPersist=10m"
end
rsh = [
"ssh -p #{ssh_info[:port]} " +
proxy_command +
"-o ControlMaster=auto " +
"-o ControlPath=#{controlpath} " +
"-o ControlPersist=10m " +
control_options +
"-o StrictHostKeyChecking=no " +
"-o IdentitiesOnly=true " +
"-o UserKnownHostsFile=/dev/null",