You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 with EXIT_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.
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...).
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I would like to use the
petpvccommand 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_SUCCESSinstead. This behaviour is aligned with modern CLI standards whereby calling an entry point without argument or with-hor--helpshould yield a description of the program and exit without errors.I tried applying this patch to the
conda-forgebuild and it works as intended.