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:
commit
04aa602d04
1 changed files with 6 additions and 1 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue