Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flag for app considered ambiguous option to pipx run #823

Closed
C-nit opened this issue Mar 3, 2022 · 3 comments · Fixed by #898
Closed

flag for app considered ambiguous option to pipx run #823

C-nit opened this issue Mar 3, 2022 · 3 comments · Fixed by #898
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@C-nit
Copy link

C-nit commented Mar 3, 2022

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

@uranusjr
Copy link
Member

uranusjr commented Mar 3, 2022

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 uranusjr closed this as completed Mar 3, 2022
@C-nit
Copy link
Author

C-nit commented Mar 3, 2022

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.

@cs01 cs01 reopened this Mar 3, 2022
@cs01
Copy link
Member

cs01 commented Mar 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants