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

Global CLI flags cannot be passed to commands #3557

Closed
zanieb opened this issue May 13, 2024 · 3 comments · Fixed by #3558
Closed

Global CLI flags cannot be passed to commands #3557

zanieb opened this issue May 13, 2024 · 3 comments · Fixed by #3558
Assignees
Labels
cli Related to the command line interface

Comments

@zanieb
Copy link
Member

zanieb commented May 13, 2024

It's not a great user experience to need to be aware which flags are global and pass them in a different location.

e.g.

❯ uv run --isolated --with anyio -- python -c "print('hi')"
error: unexpected argument '--isolated' found

  tip: to pass '--isolated' as a value, use '-- --isolated'

Usage: uv run [OPTIONS] [TARGET] [ARGS]...

For more information, try '--help'.

vs

❯ uv --isolated run --with anyio -- python -c "print('hi')"
warning: `uv run` is experimental and may change without warning.
Resolved 3 packages in 195ms
Downloaded 3 packages in 78ms
Installed 3 packages in 8ms
 + anyio==4.3.0
 + idna==3.7
 + sniffio==1.3.1
hi
@zanieb zanieb added the cli Related to the command line interface label May 13, 2024
@charliermarsh charliermarsh self-assigned this May 13, 2024
@charliermarsh
Copy link
Member

It's only isolated that's affected by this. The others work.

@zanieb
Copy link
Member Author

zanieb commented May 13, 2024

Oh... haha my luck! Thanks!

@charliermarsh
Copy link
Member

Took me a few tries but figured it out :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants