]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
log ssh command at debug level
authorelijah <elijah@riseup.net>
Sun, 16 Dec 2012 07:31:37 +0000 (23:31 -0800)
committerelijah <elijah@riseup.net>
Sun, 16 Dec 2012 07:31:37 +0000 (23:31 -0800)
lib/leap_cli/commands/shell.rb

index f1af3e9b7509e6433022a686e936bdaac3e001d2..5d8fc662a9cfb636c23aed69a2bf84d599d464a4 100644 (file)
@@ -16,7 +16,10 @@ module LeapCli; module Commands
       end
       username = 'root'
       # the echo sets the terminal title. it would be better to do this on the server
-      exec "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\" && ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+      cmd = "ssh -l #{username} -p #{node.ssh.port} #{options.join(' ')} #{node.name}"
+      log 2, cmd
+      title = "echo -n \"\\033]0;#{username}@#{node.domain.full}\007\""
+      exec "#{title} && #{cmd}"
     end
   end