diff options
Diffstat (limited to 'lib/leap_cli/util.rb')
-rw-r--r-- | lib/leap_cli/util.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/leap_cli/util.rb b/lib/leap_cli/util.rb index 07ffcec..b648a3d 100644 --- a/lib/leap_cli/util.rb +++ b/lib/leap_cli/util.rb @@ -13,8 +13,14 @@ module LeapCli ## def exit_status(code=nil) - @exit_status = code if code - @exit_status + if !code.nil? + if code == 0 && @@exit_status.nil? + @@exit_status = 0 + else + @@exit_status = code + end + end + @@exit_status end # |