use command map directly

This commit is contained in:
Florian Schwab 2015-07-28 16:26:26 +02:00
parent 2440233d72
commit 7656037519
1 changed files with 3 additions and 3 deletions

View File

@ -21,10 +21,10 @@ namespace :rails do
rails_console_args << '--sandbox' if ENV.key?('sandbox') || ENV.key?('s')
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
bundle_mapped = SSHKit.config.command_map.prefix[:bundle] rescue nil
rails_env = fetch(:rails_env, fetch(:stage, 'production'))
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
port = host.port || (host.ssh_options || {})[:port]