-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Help shown via no_args_is_help results in exit code 2, was 0 #1489
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
Conversation
|
Changing this caused a test to fail, but it seems to be revealing something weird about the processing, not a problem with this change. The following causes an exit code of import click
@click.group()
@click.argument("obj")
def cli(obj):
click.echo(f"obj={obj}")
@cli.command()
def move():
click.echo("move")
cli(["obj1", "--help"]) The problem is caused here in Lines 1398 to 1407 in 0ad4e79
|
Ironically, I just closed #1323 which discussed how the processing pipeline needs a rewrite, and then re-discovered that this PR demonstrates the issue. |
36f9993
to
9b38044
Compare
Pushed a new implementation that uses a new |
I started looking into this before 8.1, and it's too complex to disentangle the pipeline issues right now. I have plans for the parser/pipeline, so I'll come back to this then. |
9b38044
to
f25a673
Compare
…gs which lead to args being empty -> --help leading to exit code 2 instead of 0. * Added PR to CHANGES. * Fixed typing. * Fixed test to be up to date with rebased changes.
Nice one @AndreasBackx 🙌 |
fixes #1394
fixes #1486