mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
fix(installer): set UV_NO_CONFIG=1 to avoid permission denied under sudo -u
When the installer is run via , uv resolves config file paths against the process owner's (root) home directory rather than the effective user's, causing a Permission denied error when trying to read /root/uv.toml. Setting UV_NO_CONFIG=1 prevents uv from discovering any config files (uv.toml, pyproject.toml) during installation, which is the correct behavior for a bootstrap script that manages its own environment. Fixes #21269
This commit is contained in:
parent
292f468366
commit
c80fa728bd
2 changed files with 8 additions and 0 deletions
|
|
@ -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 <user>. See #21269.
|
||||
export UV_NO_CONFIG=1
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
|
|
|
|||
|
|
@ -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 <user>. See #21269.
|
||||
export UV_NO_CONFIG=1
|
||||
|
||||
PYTHON_VERSION="3.11"
|
||||
|
||||
is_termux() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue