diff --git a/src/cli/command_parser.rb b/src/cli/command_parser.rb index 0750bb5b3e..01b959f8c4 100644 --- a/src/cli/command_parser.rb +++ b/src/cli/command_parser.rb @@ -481,9 +481,12 @@ module CommandParser begin rc = comm[:proc].call - if rc.instance_of?(Array) + if rc.instance_of?(Array) && rc[0] != 0 + STDERR.puts rc[1] + exit(rc[0]) + elsif rc.instance_of?(Array) puts rc[1] - exit rc.first + exit(rc[0]) else exit(@exit_code || rc) end