diff options
-rw-r--r-- | lib/leap_cli/commands/test.rb | 6 | ||||
-rw-r--r-- | lib/leap_cli/util.rb | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/leap_cli/commands/test.rb b/lib/leap_cli/commands/test.rb index 962053d..73207b3 100644 --- a/lib/leap_cli/commands/test.rb +++ b/lib/leap_cli/commands/test.rb @@ -18,7 +18,11 @@ module LeapCli; module Commands ssh.run(test_cmd(options)) end rescue Capistrano::CommandError => exc - bail! unless options[:continue] + if options[:continue] + exit_status(1) + else + bail! + end end end end 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 # |