core: SSHRun uses new ShellQuote util
This commit is contained in:
parent
72398faeaf
commit
86f8ff8816
|
@ -1,6 +1,7 @@
|
|||
require "log4r"
|
||||
|
||||
require "vagrant/util/ssh"
|
||||
require "vagrant/util/shell_quote"
|
||||
|
||||
module Vagrant
|
||||
module Action
|
||||
|
@ -33,10 +34,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
# Get the command and wrap it in a login shell
|
||||
command = env[:ssh_run_command]
|
||||
command = command.gsub(/'/) do |m|
|
||||
"#{m}\\#{m}#{m}"
|
||||
end
|
||||
command = ShellQuote.escape(env[:ssh_run_command], "'")
|
||||
command = "#{env[:machine].config.ssh.shell} -c '#{command}'"
|
||||
|
||||
# Execute!
|
||||
|
|
Loading…
Reference in New Issue