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

Merge pull request #15 from joelcogen/patch-1

Support user being set in ssh_options
This commit is contained in:
Florian Schwab 2015-06-23 20:45:02 +02:00
commit 04aa602d04

View file

@ -29,7 +29,12 @@ namespace :rails do
port = host.port || (host.ssh_options || {})[:port]
ssh_cmd_args << "-p #{port}" if port
ssh_cmd_args << [host.user, host.hostname].compact.join('@')
ssh_user = if host.ssh_options && host.ssh_options[:user]
host.ssh_options[:user]
else
host.user
end
ssh_cmd_args << [ssh_user, host.hostname].compact.join('@')
if host.ssh_options && host.ssh_options[:keys] && host.ssh_options[:keys].length > 0
identity = host.ssh_options[:keys][0]