mirror of
https://github.com/zhigang1992/boxen.git
synced 2026-01-12 17:12:46 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user