diff --git a/scripts/install.sh b/scripts/install.sh index ab305544bd..d452a26490 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -28,6 +28,10 @@ if [ -n "${PYTHONHOME:-}" ]; then unset PYTHONHOME fi +# Prevent uv from discovering config files (uv.toml, pyproject.toml) from the +# wrong user's home directory when running under sudo -u . See #21269. +export UV_NO_CONFIG=1 + # Colors RED='\033[0;31m' GREEN='\033[0;32m' diff --git a/setup-hermes.sh b/setup-hermes.sh index 5d0f2928ab..4d83f94ffb 100755 --- a/setup-hermes.sh +++ b/setup-hermes.sh @@ -29,6 +29,10 @@ NC='\033[0m' SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd "$SCRIPT_DIR" +# Prevent uv from discovering config files (uv.toml, pyproject.toml) from the +# wrong user's home directory when running under sudo -u . See #21269. +export UV_NO_CONFIG=1 + PYTHON_VERSION="3.11" is_termux() {