1
0
Fork 0
mirror of https://gitlab.com/ydkn/capistrano-rails-console.git synced 2023-02-13 20:54:14 -05:00

fixed commandline translation of ssh options

This commit is contained in:
Florian Schwab 2015-02-10 20:33:37 +01:00
parent 980b4b8e18
commit 343ad762b3

View file

@ -16,10 +16,10 @@ namespace :rails do
if host.ssh_options && host.ssh_options[:proxy]
template = host.ssh_options[:proxy].command_line_template
ssh_cmd_options << "ProxyCommand=\"#{template}\""
ssh_cmd_options << "-o ProxyCommand=\"#{template}\""
end
ssh_cmd_options_str = "-o #{ssh_cmd_options.join(' ')}" if ssh_cmd_options.size > 0
ssh_cmd_options_str = ssh_cmd_options.join(' ') if ssh_cmd_options.size > 0
user_host = [host.user, host.hostname].compact.join('@')
ssh_cmd = "ssh #{ssh_cmd_options_str} #{user_host} -p #{host.port || 22}"