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

addCmd prints an empty string for unknown commands #8450

Open
ffaf1 opened this issue Sep 3, 2022 · 1 comment
Open

addCmd prints an empty string for unknown commands #8450

ffaf1 opened this issue Sep 3, 2022 · 1 comment

Comments

@ffaf1
Copy link
Collaborator

ffaf1 commented Sep 3, 2022

Describe the bug
addCmd prints an empty string for missing commands, see this clear diagnosis in #8433.

To Reproduce
Steps to reproduce the behavior:

  • try to modify the relevant part of cabal help output.
  • Place an `addCmd "weird-command".

Expected behavior
Undecided between: a simple "??? unrecognised command" in the help or a more stern failing assertion (latter option only if help is part of tests somehow).

System information

  • Debian
  • HEAD
@ffaf1 ffaf1 added the type: bug label Sep 3, 2022
@Mikolaj
Copy link
Member

Mikolaj commented Sep 5, 2022

How about assert that fails hard, but when assertions are turned off (which is the case for non-dev builds), do the "???" bit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants