Help shown via no_args_is_help results in exit code 2, was 0#1489
Help shown via no_args_is_help results in exit code 2, was 0#1489AndreasBackx merged 3 commits intopallets:mainfrom
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