We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d25b672 commit 8e6d7f5Copy full SHA for 8e6d7f5
lib/vSphere/action/sync_folders.rb
@@ -47,8 +47,13 @@ def call(env)
47
:guestpath => guestpath))
48
49
# Create the guest path
50
- env[:machine].communicate.sudo("mkdir -p '#{guestpath}'")
51
- env[:machine].communicate.sudo("chown #{ssh_info[:username]} '#{guestpath}'")
+ if env[:machine].communicate.class.to_s =~ /WinRM/
+ env[:machine].communicate.execute("New-Item '#{guestpath}' -type directory -force")
52
+
53
+ else
54
+ env[:machine].communicate.sudo("mkdir -p '#{guestpath}'")
55
+ env[:machine].communicate.sudo("chown #{ssh_info[:username]} '#{guestpath}'")
56
+ end
57
58
# Rsync over to the guest path using the SSH info
59
command = [
0 commit comments