fix: plain if in the installer's uv lookup (shellcheck SC2015)

This commit is contained in:
Alex committed 2026-09-16 01:10:11 +01:00
1 parent 4f0bf2cca8
commit bd35281259
1 file changed
+3 -1
+3 -1
View File
@@ -96,7 +96,9 @@ main() {
# uv installs and upgrades the package, and brings Python 3.12 when the system has none.
local uv="" candidate found
for candidate in "$(command -v uv 2>/dev/null || true)" "$HOME/.local/bin/uv" "$HOME/.cargo/bin/uv"; do
[ -n "$candidate" ] && [ -x "$candidate" ] || continue
if [ -z "$candidate" ] || [ ! -x "$candidate" ]; then
continue
fi
found="$("$candidate" --version 2>/dev/null | awk '{print $2}')" || continue
if [ -n "$found" ] && version_ge "$found" "$UV_MIN_VERSION"; then
uv="$candidate"