mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-14 09:11:54 +00:00
fix(desktop): align fresh-install home so upgraders don't brick
Two related first-launch bugs on machines with a legacy ~/.hermes: - install.ps1 hardcoded $HermesHome/$InstallDir to %LOCALAPPDATA%\hermes and ignored the HERMES_HOME the desktop passes through. The desktop freezes HERMES_HOME at module load and prefers a legacy ~/.hermes when %LOCALAPPDATA%\hermes is absent, so the installer wrote to a different home than the shell read -> "Could not connect to Hermes gateway". Honor $env:HERMES_HOME in the param defaults. - isBootstrapComplete() trusted the marker + checkout without verifying a runnable venv, so an interrupted/split install spawned a dead backend instead of re-bootstrapping. Also require the venv python to exist.
This commit is contained in:
parent
960ea8a849
commit
5aade4bc57
2 changed files with 7 additions and 4 deletions
|
|
@ -23,8 +23,8 @@ param(
|
|||
# exact ref. Precedence: Commit > Tag > Branch.
|
||||
[string]$Commit = "",
|
||||
[string]$Tag = "",
|
||||
[string]$HermesHome = "$env:LOCALAPPDATA\hermes",
|
||||
[string]$InstallDir = "$env:LOCALAPPDATA\hermes\hermes-agent",
|
||||
[string]$HermesHome = $(if ($env:HERMES_HOME) { $env:HERMES_HOME } else { "$env:LOCALAPPDATA\hermes" }),
|
||||
[string]$InstallDir = $(if ($env:HERMES_HOME) { "$env:HERMES_HOME\hermes-agent" } else { "$env:LOCALAPPDATA\hermes\hermes-agent" }),
|
||||
|
||||
# --- Stage protocol (additive; default invocation behaves as before) ----
|
||||
# See the "Stage protocol" section near the bottom of the file for the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue