Skip to content

Conversation

@F4RAN
Copy link
Contributor

@F4RAN F4RAN commented Dec 11, 2025

Summary

Adds a --force flag to uv python update-shell and uv tool update-shell to allow prepending the executable directory to PATH even when it's already present. This fixes cases where binaries are shadowed by earlier PATH entries.

When --force is used, the command removes any existing entry and prepends it again, ensuring first priority. Works on both Unix/macOS (shell config files) and Windows (registry).

Test Plan

  • Added integration tests for normal, skip, and force cases
  • Manually tested on macOS with both commands
  • All existing tests pass
  • Windows support will be tested automatically in CI

Fixes #16782

This allows users to force prepending the executable directory to PATH
even when it's already present, fixing shadowed binaries.
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update-shell should support force pre-pending to the PATH

1 participant