Update mount_shared_folder.rb

This change allows special characters in the password such as ) which will cause cmdkey to fail without the quotes.
This commit is contained in:
John Rizzo 2018-07-09 14:27:38 -04:00 committed by Brian Cain
parent 89a21f0f47
commit b7d702ab5f
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ module VagrantPlugins
# Ensure password is scrubbed
Vagrant::Util::CredentialScrubber.sensitive(options[:smb_password])
end
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:#{options[:smb_password]}", {shell: :powershell, elevated: true})
machine.communicate.execute("cmdkey /add:#{options[:smb_host]} /user:#{options[:smb_username]} /pass:\"#{options[:smb_password]}\"", {shell: :powershell, elevated: true})
mount_shared_folder(machine, name, guestpath, "\\\\#{options[:smb_host]}\\")
end