`poetry run` swallows `--help` from the underlying sub-command
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name:
- Poetry version:
- Link of a Gist with the contents of your pyproject.toml file:
Issue
Poetry is swallowing the --help
long-option and not passing it to the underlying command. In this specific example, I was trying to get the help-text from black
.
(.venv) kstone@kstone-mbp ~> poetry run black --help
USAGE
poetry run <args1> ... [<argsN>]
ARGUMENTS
<args> The command and arguments/options to run.
GLOBAL OPTIONS
-h (--help) Display this help message
-q (--quiet) Do not output any message
-v (--verbose) Increase the verbosity of messages: "-v" for normal output, "-vv" for more verbose output and
"-vvv" for debug
-V (--version) Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n (--no-interaction) Do not ask any interactive question
(.venv) kstone@kstone-mbp ~> poetry run black --version
black, version 19.3b0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Untitled
... anaconda-user-help-blivet-gui.tar.gz anaconda-user-help.spec anaconda-user-help-9.0.0.tar.gz ... cscope-7-fscanner-swallow-function-as-parameters.patch ...
Read more >irrevocably - OSCHINA - 中文开源技术交流社区
Will there be any way to retrieve my subscription data from Google in the future? No -- all subscription data will be permanently,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The issue is in
CliKit
since it doesn’t respect it’s own--
stop-token when processing the help option:Help special case: https://github.com/sdispater/clikit/blob/9b0e11e0863c9ed10bff743436ce405add0b6121/src/clikit/config/default_application_config.py#L147
Arguments are tested here: https://github.com/sdispater/clikit/blob/9b0e11e0863c9ed10bff743436ce405add0b6121/src/clikit/resolver/default_resolver.py#L117-L120
This should be fixed via c4b2c38575ff93e61044c2e67bf01a4fd03d38d0 since the double-dash was added in clikit v0.4.0