From a08b909199a5c4cdc83f6b2077f52d349ff4ba2c Mon Sep 17 00:00:00 2001 From: Gille <4317663+helix4u@users.noreply.github.com> Date: Sat, 22 Aug 2026 00:29:03 -0600 Subject: [PATCH] fix(windows): preserve launcher layout invariants --- hermes_cli/_install_repair.py | 12 ++++++------ scripts/install.ps1 | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hermes_cli/_install_repair.py b/hermes_cli/_install_repair.py index e586c7cc1e..848d400b0b 100644 --- a/hermes_cli/_install_repair.py +++ b/hermes_cli/_install_repair.py @@ -135,12 +135,12 @@ def _sync_windows_cli_launchers(root: Path) -> list[Path]: root = Path(root) scripts_dir = _venv_scripts_dir(root) - required_source = ( - scripts_dir / "hermes.exe" - if scripts_dir is not None - else root / "venv" / "Scripts" / "hermes.exe" - ) - if scripts_dir is None or not required_source.is_file(): + if scripts_dir is None: + raise FileNotFoundError( + f"project venv executable directory not found under: {root}" + ) + required_source = scripts_dir / "hermes.exe" + if not required_source.is_file(): raise FileNotFoundError( f"required Hermes launcher not found: {required_source}" ) diff --git a/scripts/install.ps1 b/scripts/install.ps1 index d045707e4a..67f08bcb66 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -3013,7 +3013,8 @@ function Set-PathVariable { if ($NoVenv) { $hermesBin = "$InstallDir" } else { - $hermesBin = Install-HermesCommandLaunchers -Root $InstallDir + $hermesBin = "$InstallDir\bin" + Install-HermesCommandLaunchers -Root $InstallDir | Out-Null } $currentPath = [Environment]::GetEnvironmentVariable("Path", "User")