aboutsummaryrefslogtreecommitdiff
path: root/bin/leap
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-06-27 17:19:51 -0700
committerelijah <elijah@riseup.net>2014-06-27 17:19:51 -0700
commit09a82209f3a40e75caf966ba41b17da1a9ced146 (patch)
tree586cfdff7b8d42736ab6559c917b9d2fce4b130c /bin/leap
parent6da0270db08f734f2d586a0fc957875e86485549 (diff)
downloadleap_cli-09a82209f3a40e75caf966ba41b17da1a9ced146.tar.gz
leap_cli-09a82209f3a40e75caf966ba41b17da1a9ced146.tar.bz2
leap list improvements: lazy evaluation; don't bomb on ConfigError; remove requirements.rb
Diffstat (limited to 'bin/leap')
-rwxr-xr-xbin/leap21
1 files changed, 19 insertions, 2 deletions
diff --git a/bin/leap b/bin/leap
index 75c14c7..c492127 100755
--- a/bin/leap
+++ b/bin/leap
@@ -78,9 +78,26 @@ module LeapCli::Commands
exit(0)
end
+ # disable GLI error catching
+ ENV['GLI_DEBUG'] = "true"
+ def error_message(msg)
+ end
+
# load commands and run
commands_from('leap_cli/commands')
ORIGINAL_ARGV = ARGV.dup
- exit_status = run(ARGV)
- exit(LeapCli::Util.exit_status || exit_status)
+ begin
+ exit_status = run(ARGV)
+ exit(LeapCli::Util.exit_status || exit_status)
+ rescue StandardError => exc
+ if LeapCli.log_level < 2
+ if exc.respond_to? :log
+ exc.log
+ else
+ puts "%s: %s" % [exc.class, exc.message]
+ end
+ else
+ raise exc
+ end
+ end
end