diff options
author | elijah <elijah@riseup.net> | 2014-06-27 17:19:51 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-06-27 17:19:51 -0700 |
commit | 09a82209f3a40e75caf966ba41b17da1a9ced146 (patch) | |
tree | 586cfdff7b8d42736ab6559c917b9d2fce4b130c /bin | |
parent | 6da0270db08f734f2d586a0fc957875e86485549 (diff) |
leap list improvements: lazy evaluation; don't bomb on ConfigError; remove requirements.rb
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/leap | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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 |