From 31b48b5ff5dd1286383e85c7552fe9c65967e8ae Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 27 Jun 2012 09:47:49 -0400 Subject: [PATCH] allow passing ssh commands --- lib/cap-pack.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/cap-pack.rb b/lib/cap-pack.rb index 3421b55..a4a9ba5 100644 --- a/lib/cap-pack.rb +++ b/lib/cap-pack.rb @@ -4,6 +4,8 @@ Capistrano::Configuration.instance.load do def tty_ssh_command_in_current_host(command, hostname = current_host) 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}'"} end