aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/util.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/util.rb')
-rw-r--r--lib/leap_cli/util.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb
index 0174158..19930d2 100644
--- a/lib/leap_cli/util.rb
+++ b/lib/leap_cli/util.rb
@@ -30,8 +30,10 @@ module LeapCli
#
def bail!(*message)
if block_given?
- LeapCli.log_level = 3
+ level = LeapCli.log_level
+ LeapCli.set_log_level(3)
yield
+ LeapCli.set_log_level(level)
elsif message
log 0, *message
end