Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #809 Use showHelpOnEmpty #5786

Merged
merged 1 commit into from
Jul 20, 2022
Merged

Conversation

mpilgrem
Copy link
Member

For example, before the change, stack ls yields only:

Missing: COMMAND

Usage: stack.exe ls COMMAND [--setup-info-yaml URL]
                    [--snapshot-location-base URL] [--help]
  List command. (Supports snapshots, dependencies and stack's styles)

After the change, stack ls yields the more informative:

Usage: stack.exe ls COMMAND [--setup-info-yaml URL]
                    [--snapshot-location-base URL] [--help]
  List command. (Supports snapshots, dependencies and stack's styles)

Available options:
  --setup-info-yaml URL    Alternate URL or relative / absolute path for stack
                           dependencies
  --snapshot-location-base URL
                           The base location of LTS/Nightly snapshots
  --help                   Show this help text

Available commands:
  snapshots                View local snapshot (default option)
  dependencies             View the dependencies
  stack-colors             View stack's output styles
  stack-colours            View stack's output styles (alias for 'stack-colors')

Run 'stack --help' for global options that apply to all subcommands.

Also deletes the case:

Failure _ | null args -> withArgs ["--help"] (execParser parser)

as stack (without more) is now handled without it.

Also updates ChangeLog.md.

Tested by building and using Stack, including using Stack with scripts and stack script.

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

For example, before the change, `stack ls` yields only:

~~~
Missing: COMMAND

Usage: stack.exe ls COMMAND [--setup-info-yaml URL]
                    [--snapshot-location-base URL] [--help]
  List command. (Supports snapshots, dependencies and stack's styles)
~~~

After the change, `stack ls` yields the more informative:

~~~
Usage: stack.exe ls COMMAND [--setup-info-yaml URL]
                    [--snapshot-location-base URL] [--help]
  List command. (Supports snapshots, dependencies and stack's styles)

Available options:
  --setup-info-yaml URL    Alternate URL or relative / absolute path for stack
                           dependencies
  --snapshot-location-base URL
                           The base location of LTS/Nightly snapshots
  --help                   Show this help text

Available commands:
  snapshots                View local snapshot (default option)
  dependencies             View the dependencies
  stack-colors             View stack's output styles
  stack-colours            View stack's output styles (alias for 'stack-colors')

Run 'stack --help' for global options that apply to all subcommands.
~~~

Also deletes the case:

~~~haskell
Failure _ | null args -> withArgs ["--help"] (execParser parser)
~~~

as `stack` (without more) is now handled without it.

Also updates `ChangeLog.md`.

Tested by building and using Stack, including using Stack with scripts and `stack script`.
@mpilgrem mpilgrem merged commit c99a821 into commercialhaskell:master Jul 20, 2022
@mpilgrem mpilgrem deleted the fix809 branch July 20, 2022 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant