Skip to content

Commit 578be38

Browse files
simonfaltumclaude
andauthored
fix: handle multiple uv installations in fail-missing-uv test (#4422)
## Summary The `fail-missing-uv` acceptance test was failing on systems with multiple `uv` installations because it only removed the first `uv` directory from PATH. The test script used `command -v uv` which returns only the first matching binary. On systems with multiple `uv` installations (e.g., one from homebrew at `/opt/homebrew/bin/uv` and another from a tool like langflow at `~/.langflow/uv/uv`), the script would only remove one directory, leaving other `uv` binaries accessible. This caused the test to pass unexpectedly instead of failing with "uv: command not found". **Fix:** Changed the script to loop through all `uv` installations using `which -a uv` and remove each containing directory from PATH. ## Test plan - [x] Verified the test now correctly fails with "uv: command not found" on a system with multiple `uv` installations - [x] Ran the full acceptance test suite to ensure no regressions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c7b8cfa commit 578be38

File tree

1 file changed

+4
-4
lines changed
  • acceptance/bundle/templates/default-python/fail-missing-uv

1 file changed

+4
-4
lines changed

acceptance/bundle/templates/default-python/fail-missing-uv/script

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ trace $CLI bundle init default-python --config-file ./input.json --output-dir ou
33
cd output/fail_missing_uv
44
trace $CLI bundle validate
55

6-
# Dynamically find the directory containing 'uv' and remove it from PATH
7-
uv_dir=$(dirname "$(command -v uv 2>/dev/null || which uv 2>/dev/null)")
8-
if [ -n "$uv_dir" ]; then
6+
# Dynamically find ALL directories containing 'uv' and remove them from PATH
7+
for uv_path in $(which -a uv 2>/dev/null); do
8+
uv_dir=$(dirname "$uv_path")
99
export PATH=$(echo "$PATH" | tr ':' '\n' | grep -v "^$uv_dir$" | paste -sd: -)
10-
fi
10+
done
1111

1212
# Try to deploy, expect failure due to missing uv
1313
errcode trace $CLI bundle deploy

0 commit comments

Comments
 (0)