fix: source uv environment after fresh installation in install.sh#1468
fix: source uv environment after fresh installation in install.sh#1468Br1an67 wants to merge 1 commit intoMoonshotAI:mainfrom
Conversation
a57b924 to
0f583af
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f583afae6
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
scripts/install.sh
Outdated
| elif [ -f "${CARGO_HOME:-$HOME/.cargo}/env" ]; then | ||
| . "${CARGO_HOME:-$HOME/.cargo}/env" |
There was a problem hiding this comment.
Ensure ~/.local/bin fallback still runs when cargo env exists
Sourcing "${CARGO_HOME:-$HOME/.cargo}/env" in an elif branch can leave uv undiscoverable in a common setup: ~/.cargo/env exists (from rustup), but uv was just installed to ~/.local/bin and that directory is not on PATH. In that case this branch runs, the else fallback is skipped, and the script still hits Error: uv not found after installation.; I reproduced this by running the new branch logic with PATH=/usr/bin:/bin and an existing ~/.cargo/env.
Useful? React with 👍 / 👎.
After installing uv via the astral.sh installer, the current shell's PATH is not updated, causing 'uv not found' errors. Source the uv env script (or fall back to adding ~/.local/bin to PATH) after installation so subsequent commands can find uv. Fixes MoonshotAI#1107
0f583af to
61708bb
Compare
Problem
After installing uv via the astral.sh installer, the current shell's PATH is not updated, causing
uv not found after installationerrors.Fix
Source the uv env script (
~/.local/bin/envor$CARGO_HOME/env) after installation, with a fallback to manually adding~/.local/binto PATH.Fixes #1107