Merge pull request #779 from basecamp/fix-log-following

Escape single quotes to fix log following
This commit is contained in:
Donal McBreen
2024-04-26 14:25:27 +01:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ module Kamal::Commands
elsif config.ssh.proxy && config.ssh.proxy.is_a?(Net::SSH::Proxy::Command)
cmd << " -o ProxyCommand='#{config.ssh.proxy.command_line_template}'"
end
cmd << " -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ")}'"
cmd << " -t #{config.ssh.user}@#{host} -p #{config.ssh.port} '#{command.join(" ").gsub("'", "'\\\\''")}'"
end
end