mirror of
https://gitlab.com/ydkn/capistrano-rails-console.git
synced 2023-02-13 20:54:14 -05:00
use command map directly
This commit is contained in:
parent
2440233d72
commit
7656037519
1 changed files with 3 additions and 3 deletions
|
@ -22,9 +22,9 @@ namespace :rails do
|
||||||
rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
|
rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
|
||||||
|
|
||||||
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
|
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
|
||||||
bundle_mapped = SSHKit.config.command_map.prefix[:bundle] rescue nil
|
bundle_cmd = (SSHKit.config.command_map[:bundle] rescue nil) || :bundle
|
||||||
|
|
||||||
cmd = SSHKit::Command.new(((bundle_mapped.first + ' bundle') rescue :bundle), :exec, :rails, :console, rails_env, *rails_console_args, host: host)
|
cmd = SSHKit::Command.new(bundle_cmd, :exec, :rails, :console, rails_env, *rails_console_args, host: host)
|
||||||
SSHKit.config.output << cmd
|
SSHKit.config.output << cmd
|
||||||
|
|
||||||
port = host.port || (host.ssh_options || {})[:port]
|
port = host.port || (host.ssh_options || {})[:port]
|
||||||
|
|
Loading…
Reference in a new issue