mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 13:26:40 +00:00
Extends #124526's class fix to the two remaining native captures that can carry a profile path, and closes the secondary issue from the report: - scripts/desktop-update/runtime.ps1: the launcher --print-runtime-command JSON and the legacy user-bin --version 'Install directory:' capture are both scoped to [Console]::OutputEncoding = UTF-8 and restored in finally, matching install.ps1's Invoke-Native -Utf8Output and every other consumer of the boundary (windows_ssh_runtime, the Electron updater, the Rust bootstrap all decode UTF-8). PS 5.1's OEM decode mojibaked the reported install root so the legacy identity check never matched on a non-ASCII profile. - scripts/install.ps1: -HermesHome equal to or inside -InstallDir puts the pm tool store inside the checkout; the repository stage's occupied- directory preflight then refuses every retry after the first run populated <InstallDir>\tools. Refused up front unless HERMES_RUNTIME_DIR parks the store elsewhere. Tests: tests/scripts/desktop_update/test_desktop_update_runtime_unicode.py (real published launcher, non-ASCII profile, CP936/437/65001, encoding restore) and scripts/tests/test-install-ps1-store-guard.ps1 (real installer subprocess through -ShowResolvedPaths: refusal, escape hatch, defaults). Co-authored-by: 择梦舟 <158067205+dreamfarer-space@users.noreply.github.com>