Don't abort for help display

`abort` is a quick way to print-and-quit, but asking for help isn't the
same as the command failing.
This commit is contained in:
Yossef Mendelssohn
2012-10-11 11:59:40 -04:00
parent d5c0e5b5df
commit ce4f86f35c
2 changed files with 7 additions and 1 deletions

View File

@@ -18,7 +18,11 @@ module Boxen
end
def run
abort "#{flags}\n" if flags.help?
if flags.help?
puts flags
exit
end
runner.run
end

View File

@@ -27,6 +27,8 @@ class BoxenCLITest < Boxen::Test
end
def test_help
$stdout.stubs(:write)
flags = Boxen::Flags.new('--help')
cli = Boxen::CLI.new(@config, flags)
cli.runner.expects(:run).never