Skip to content

CLI: Should the zero-args implicit help return a non-zero error code? #246

@ncoghlan

Description

@ncoghlan

As mentioned in fastapi/typer#1240, click (and hence typer) changed their handling of the "display help with zero arguments" case to return a non-zero exit code (distinguishing it from explicitly requesting the help output with the --help option)

vevnstacks is currently using a workaround to restore the old behaviour of having venvstacks and venvstacks --help both return zero as the exit code.

However, the rationale for the underlying CLI libraries making the change is fairly compelling: while venvstacks --help is a non-error response to the specific request made, having venvstacks print the help text is more a matter of saying "That isn't a valid request, here's the usage message so the next request can be populated correctly".

Metadata

Metadata

Assignees

No one assigned

    Labels

    Affects: Command LineAffects the command line interfacequestionFurther information is requested

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions