diff --git a/scripts/install.sh b/scripts/install.sh index 0e392ffec..8cbe57e67 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,11 +4,13 @@ set -euo pipefail install_uv() { if command -v curl >/dev/null 2>&1; then curl -fsSL https://astral.sh/uv/install.sh | sh + refresh_uv_env return fi if command -v wget >/dev/null 2>&1; then wget -qO- https://astral.sh/uv/install.sh | sh + refresh_uv_env return fi @@ -16,6 +18,16 @@ install_uv() { exit 1 } +refresh_uv_env() { + local uv_env="${XDG_BIN_HOME:-$HOME/.local/bin}/env" + if [ -f "$uv_env" ]; then + # shellcheck disable=SC1090 + . "$uv_env" + else + export PATH="${XDG_BIN_HOME:-$HOME/.local/bin}:$PATH" + fi +} + if command -v uv >/dev/null 2>&1; then UV_BIN="uv" else