Closed ghisvail closed 3 years ago
could you check if this needs to be done in the other executables as well then please?
As a regular user of CLI tools, I would expect all help calls to petpvc
or petpvc <command>
to stdout a docstring and return with EXIT_SUCCESS
. EXIT_FAILURE
should really happen when the user-specified arguments are inconsistent with what the CLI parser expects (missing required argument, wrong type of an argument, file not found...).
I'll propagate the proposed fix to all commands then.
It looks like only the petpvc
entry-point has got something to print. The sub-commands just EXIT_FAILURE
without output to stdout. In this case, I'd probably keep the current behavior as is for the sub-commands.
The best UX would be to print a contextual docstring for the specific command before returning EXIT_SUCCESS
, but that's a larger scope than intended in this PR.
I would like to use the
petpvc
command without arguments as a test command for the conda-forge package. However, that approach currently fails since not providing any command results in a docstring being printed to stdout and the program exiting withEXIT_FAILURE
.I am proposing to return
EXIT_SUCCESS
instead. This behaviour is aligned with modern CLI standards whereby calling an entry point without argument or with-h
or--help
should yield a description of the program and exit without errors.I tried applying this patch to the
conda-forge
build and it works as intended.