pipx icon indicating copy to clipboard operation
pipx copied to clipboard

flag for app considered ambiguous option to pipx run

Open C-nit opened this issue 2 years ago • 3 comments

Describe the bug some flag arguments are not possible to provide to the app as they seem to be checked for use with run instead of the APP

How to reproduce

$ pipx --verbose run --spec kfp-tekton dsl-compile-tekton --py pipeline.py --output pipeline.yaml
usage: pipx run [-h] [--no-cache] [--pypackages] [--spec SPEC] [--verbose] [--python PYTHON] [--system-site-packages] [--index-url INDEX_URL]
                [--editable] [--pip-args PIP_ARGS]
                app ...
pipx run: error: ambiguous option: --py could match --pypackages, --python

Expected behavior any and every flag to be passed to APP directly

C-nit avatar Mar 03 '22 14:03 C-nit

You need to add -- to prevent the options from being interpreted as one to pipx run. This is how argument parsing works.

pipx --verbose run --spec kfp-tekton -- dsl-compile-tekton --py pipeline.py --output pipeline.yaml

uranusjr avatar Mar 03 '22 14:03 uranusjr

Thanks for the fast response!

This was not clear to me from the docs,

positional arguments: app ... app/package name and any arguments to be passed to it

implied to me that the arguments need no special treatment.

C-nit avatar Mar 03 '22 15:03 C-nit

Thanks for the feedback. Let’s take this as an opportunity to improve the docs. PRs welcome.

cs01 avatar Mar 03 '22 15:03 cs01