This patch fixes an issue when using rsync folders on windows clients with cygwin & ssh enabled.

Before the patch this error will happen if the original directory already exists

-------------------------------------------------------------------------------------------------
==> windows: Rsyncing folder: /vhosts/oxfamshop.com.au/ => /cygdrive/c/inetpub/wwwroot
==> windows:   - Exclude: [".vagrant/", ".git/", "target/", "node_modules/"]
==> windows: Showing rsync output...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

mkdir '/cygdrive/c/inetpub/wwwroot'

Stdout from the command:

Stderr from the command:

mkdir: cannot create directory ‘/cygdrive/c/inetpub/wwwroot’: File exists
-------------------------------------------------------------------------------------------------

After the patch, this is result

-------------------------------------------------------------------------------------------------
==> windows: Rsyncing folder: /vhosts/oxfamshop.com.au/ => /cygdrive/c/inetpub/wwwroot
==> windows:   - Exclude: [".vagrant/", ".git/", "target/", "node_modules/"]
==> windows: Showing rsync output...
==> windows: rsync[stdout] -> sending incremental file list
==> windows: rsync[stdout] ->
==> windows: rsync[stdout] -> sent 500855 bytes  received 6635 bytes  78075.38 bytes/sec
==> windows: rsync[stdout] -> total size is 175357552  speedup is 345.54
-------------------------------------------------------------------------------------------------
This commit is contained in:
Tim Aslat 2017-05-16 16:38:29 +09:30
parent 20b4766dd7
commit 630858b9a8
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module VagrantPlugins
machine.communicate.tap do |comm|
# rsync does not construct any gaps in the path to the target directory
# make sure that all subdirectories are created
comm.execute("mkdir '#{opts[:guestpath]}'")
comm.execute("mkdir -p '#{opts[:guestpath]}'")
end
end
end