allow passing ssh commands
This commit is contained in:
parent
7368b3b7fc
commit
31b48b5ff5
|
@ -4,6 +4,8 @@ Capistrano::Configuration.instance.load do
|
||||||
def tty_ssh_command_in_current_host(command, hostname = current_host)
|
def tty_ssh_command_in_current_host(command, hostname = current_host)
|
||||||
user_ssh_command = fetch(:user, nil) ? "-l #{fetch(:user)}" : ''
|
user_ssh_command = fetch(:user, nil) ? "-l #{fetch(:user)}" : ''
|
||||||
|
|
||||||
|
user_ssh_command << " #{ENV['SSH_OPTS']}" if ENV['SSH_OPTS']
|
||||||
|
|
||||||
exec %{ssh #{user_ssh_command} #{hostname} -t "#{user_shell_method} 'cd #{current_path} && #{command}'"}
|
exec %{ssh #{user_ssh_command} #{hostname} -t "#{user_shell_method} 'cd #{current_path} && #{command}'"}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue