summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2014-11-26 09:52:20 -0800
committerelijah <elijah@riseup.net>2014-11-26 09:52:20 -0800
commit2b0e44d40780d4f2f8ac6bd5b3cc4e1c7ec2edc7 (patch)
tree8d2066311024d1c71cfc75404d04202dd12ece50
parentb839376a507e37a048ea2df53127ed0884310f60 (diff)
make debugger gem optional
-rwxr-xr-xbin/leap5
-rw-r--r--lib/leap_cli/commands/pre.rb2
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/leap b/bin/leap
index 512201c..47dfdf9 100755
--- a/bin/leap
+++ b/bin/leap
@@ -2,7 +2,10 @@
if ARGV.include?('--debug') || ARGV.include?('-d')
DEBUG=true
- require 'debugger'
+ begin
+ require 'debugger'
+ rescue LoadError
+ end
else
DEBUG=false
end
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb
index 7a64c15..055f3a1 100644
--- a/lib/leap_cli/commands/pre.rb
+++ b/lib/leap_cli/commands/pre.rb
@@ -20,7 +20,7 @@ module LeapCli; module Commands
desc 'Skip prompts and assume "yes"'
switch :yes, :negatable => false
- desc 'Enable debugging library (leap_cli development only)'
+ desc 'Print full stack trace for exceptions and load `debugger` gem if installed.'
switch [:d, :debug], :negatable => false
desc 'Disable colors in output'