aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-11-03 10:36:34 -0800
committerelijah <elijah@riseup.net>2014-11-03 10:36:34 -0800
commit60f8f753a11c4543931281c56cbd568b2b00f278 (patch)
treefa8ba89b16128dde1b121f0e637d8546d49edce1 /lib
parent14526769588f20e2b49d0ab30427a788cd586733 (diff)
downloadleap_cli-60f8f753a11c4543931281c56cbd568b2b00f278.tar.gz
leap_cli-60f8f753a11c4543931281c56cbd568b2b00f278.tar.bz2
only print out net-ssh info if --debug is active
Diffstat (limited to 'lib')
-rw-r--r--lib/leap_cli/util/remote_command.rb14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/leap_cli/util/remote_command.rb b/lib/leap_cli/util/remote_command.rb
index 6353e36..2dd22ca 100644
--- a/lib/leap_cli/util/remote_command.rb
+++ b/lib/leap_cli/util/remote_command.rb
@@ -84,11 +84,15 @@ module LeapCli; module Util; module RemoteCommand
end
def net_ssh_log_level
- case LeapCli.log_level
- when 1 then 3
- when 2 then 2
- when 3 then 1
- else 0
+ if DEBUG
+ case LeapCli.log_level
+ when 1 then 3
+ when 2 then 2
+ when 3 then 1
+ else 0
+ end
+ else
+ nil
end
end