fix(adds-on): pass through version flags to real uv binary#31
Merged
Conversation
This pull request fixes the wrapper's handling of version flags to ensure compatibility with tools that parse uv's version output. The main changes prevent the wrapper from intercepting `--version` and `-V` flags. **Version flag handling fix:** * Changed the wrapper to only intercept `--wrapper-version` for displaying the wrapper's own version, while `--version` and `-V` now pass through directly to the real uv binary * Updated help text in `main.rs` to reflect the new `--wrapper-version` flag and clarify that `--version`/`-V` pass through to real uv * Added detailed comment explaining why interception breaks tools like pipx and uv's bootstrap that parse version output expecting exact semver format **Test coverage improvements:** * Renamed `version_long_flag()` test to `wrapper_version_flag()` to test the new `--wrapper-version` flag * Added `version_long_flag_passes_through()` test to verify `--version` output contains no wrapper banner and has valid semver format * Added `version_short_flag_passes_through()` test to verify `-V` output contains no wrapper banner * Updated test assertions to validate that version flags produce expected output format for external tooling compatibility
benbenbang
enabled auto-merge (squash)
June 3, 2026 18:46
|
🎉 This PR is included in version 2.6.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request fixes the wrapper's handling of version flags to ensure compatibility with tools that parse uv's version output. The main changes prevent the wrapper from intercepting
--versionand-Vflags.Version flag handling fix:
--wrapper-versionfor displaying the wrapper's own version, while--versionand-Vnow pass through directly to the real uv binarymain.rsto reflect the new--wrapper-versionflag and clarify that--version/-Vpass through to real uvTest coverage improvements:
version_long_flag()test towrapper_version_flag()to test the new--wrapper-versionflagversion_long_flag_passes_through()test to verify--versionoutput contains no wrapper banner and has valid semver formatversion_short_flag_passes_through()test to verify-Voutput contains no wrapper banner