File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ Other enhancements:
29
29
comment in ` Script.hs ` on the command line. That may help test that scripts
30
30
compile in CI (continuous integration). See
31
31
[ #5755 ] ( https://github.com/commercialhaskell/stack/issues/5755 )
32
+ * Fuller help is provided at the command line if a subcommand is missing (for
33
+ example, ` stack ls ` now yields the equivalent of ` stack ls --help ` ). See
34
+ [ #809 ] ( https://github.com/commercialhaskell/stack/issues/809 )
32
35
33
36
Bug fixes:
34
37
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ complicatedOptions
48
48
-> IO (a ,b )
49
49
complicatedOptions numericVersion stringVersion numericHpackVersion h pd footerStr commonParser mOnFailure commandParser =
50
50
do args <- getArgs
51
- (a,(b,c)) <- case execParserPure ( prefs noBacktrack) parser args of
52
- Failure _ | null args -> withArgs [ " --help " ] (execParser parser)
51
+ (a,(b,c)) <- let parserPrefs = prefs $ noBacktrack <> showHelpOnEmpty
52
+ in case execParserPure parserPrefs parser args of
53
53
-- call onFailure handler if it's present and parsing options failed
54
54
Failure f | Just onFailure <- mOnFailure -> onFailure f args
55
55
parseResult -> handleParseResult parseResult
You can’t perform that action at this time.
0 commit comments