Skip to content

fix(venv): filter --prefix flag before forwarding to uv venv#16

Merged
benbenbang merged 1 commit into
mainfrom
fix/prefix
Mar 26, 2026
Merged

fix(venv): filter --prefix flag before forwarding to uv venv#16
benbenbang merged 1 commit into
mainfrom
fix/prefix

Conversation

@benbenbang

Copy link
Copy Markdown
Owner

This commit prevents the custom --prefix flag from being passed to the underlying uv venv command, which does not recognize it. The changes ensure that only valid arguments are forwarded during virtual environment creation.

Argument filtering logic:

  • Added filtering logic in src/main.rs to strip both --prefix and --prefix=value forms from user arguments before passing them to create_venv().
  • The filtered arguments are collected into a new vector that excludes the custom flag and its value, preventing errors from the underlying uv venv command.

This commit prevents the custom --prefix flag from being passed to the underlying `uv venv` command, which does not recognize it. The changes ensure that only valid arguments are forwarded during virtual environment creation.

**Argument filtering logic:**
* Added filtering logic in `src/main.rs` to strip both `--prefix` and `--prefix=value` forms from user arguments before passing them to `create_venv()`.
* The filtered arguments are collected into a new vector that excludes the custom flag and its value, preventing errors from the underlying `uv venv` command.
@github-actions github-actions Bot added enhancement New feature or request triage labels Mar 26, 2026
@benbenbang
benbenbang enabled auto-merge (squash) March 26, 2026 17:48
@benbenbang
benbenbang merged commit d7fdd61 into main Mar 26, 2026
2 checks passed
@benbenbang
benbenbang deleted the fix/prefix branch March 26, 2026 17:48
@ptah-technical-app

Copy link
Copy Markdown

🎉 This PR is included in version 2.4.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request released triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant