Skip to content

fix(installer): set UV_NO_CONFIG=1 to avoid permission denied under sudo -u#21537

Merged
teknium1 merged 2 commits into
mainfrom
hermes/hermes-96ba2e80
May 7, 2026
Merged

fix(installer): set UV_NO_CONFIG=1 to avoid permission denied under sudo -u#21537
teknium1 merged 2 commits into
mainfrom
hermes/hermes-96ba2e80

Conversation

@teknium1

@teknium1 teknium1 commented May 7, 2026

Copy link
Copy Markdown
Contributor

Salvages #21288 (@hllqkb) onto current main. Fixes #21269.

Installer no longer fails when run via sudo -u <user> — uv was reading /root/uv.toml because it resolves config paths against the process owner's HOME, not the effective user's. Setting UV_NO_CONFIG=1 at the top of both scripts disables config discovery across every uv subcommand (python install, python find, venv, pip install, sync) without affecting pyproject.toml dependency reading.

Changes

  • scripts/install.sh, setup-hermes.sh: export UV_NO_CONFIG=1 early, next to the existing PYTHONPATH/PYTHONHOME scrubs
  • scripts/release.py: AUTHOR_MAP entry for hllqkb

Co-authored-by: hllqkb androidhtml@yandex.com

hllqkb and others added 2 commits May 7, 2026 15:20
…udo -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
@teknium1 teknium1 merged commit 7f369bf into main May 7, 2026
10 of 11 checks passed
@teknium1 teknium1 deleted the hermes/hermes-96ba2e80 branch May 7, 2026 22:21
@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: hermes/hermes-96ba2e80 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 7670 on HEAD, 7670 on base (➖ 0)

🆕 New issues (3):

Rule Count
invalid-argument-type 3
First entries
run_agent.py:6649: [invalid-argument-type] invalid-argument-type: Argument to function `build_anthropic_client` is incorrect: Expected `str`, found `str | dict[Unknown, Unknown] | Any | ... omitted 3 union elements`
run_agent.py:12542: [invalid-argument-type] invalid-argument-type: Argument to function `len` is incorrect: Expected `Sized`, found `(str & ~AlwaysFalsy) | (dict[Unknown, Unknown] & ~AlwaysFalsy) | (Any & ~AlwaysFalsy) | ... omitted 3 union elements`
run_agent.py:12539: [invalid-argument-type] invalid-argument-type: Argument to function `_is_oauth_token` is incorrect: Expected `str`, found `str | dict[Unknown, Unknown] | Any | ... omitted 3 union elements`

✅ Fixed issues (3):

Rule Count
invalid-argument-type 3
First entries
run_agent.py:12539: [invalid-argument-type] invalid-argument-type: Argument to function `_is_oauth_token` is incorrect: Expected `str`, found `str | dict[Unknown | str, Unknown | str | dict[str, str]] | Any | ... omitted 3 union elements`
run_agent.py:12542: [invalid-argument-type] invalid-argument-type: Argument to function `len` is incorrect: Expected `Sized`, found `(str & ~AlwaysFalsy) | (dict[Unknown | str, Unknown | str | dict[str, str]] & ~AlwaysFalsy) | (Any & ~AlwaysFalsy) | ... omitted 3 union elements`
run_agent.py:6649: [invalid-argument-type] invalid-argument-type: Argument to function `build_anthropic_client` is incorrect: Expected `str`, found `str | dict[Unknown | str, Unknown | str | dict[str, str]] | Any | ... omitted 3 union elements`

Unchanged: 4025 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists labels May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Installer fails with Permission denied on /root/uv.toml when run via sudo -u <user>

3 participants