mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-17 04:31:55 +00:00
fix: address review — reuse sudo var, add chown -h on symlink update
- hermes_cli/main.py: reuse the existing `sudo` variable instead of
redundant `shutil.which("sudo")` call that could return None
- nix/nixosModules.nix: add missing `chown -h` when updating an
existing symlink target so ownership stays consistent with the
fresh-create and backup-replace branches
This commit is contained in:
parent
79e8cd1233
commit
38277a6a95
2 changed files with 2 additions and 1 deletions
|
|
@ -612,7 +612,7 @@ def _exec_in_container(container_info: dict, cli_args: list):
|
|||
if val:
|
||||
env_flags.extend(["-e", f"{var}={val}"])
|
||||
|
||||
cmd_prefix = [shutil.which("sudo"), "-n", runtime] if needs_sudo else [runtime]
|
||||
cmd_prefix = [sudo, "-n", runtime] if needs_sudo else [runtime]
|
||||
exec_cmd = (
|
||||
cmd_prefix + ["exec"]
|
||||
+ tty_flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue