fix(windows): preserve launcher layout invariants

This commit is contained in:
Gille
2026-08-22 00:29:03 -06:00
committed by Teknium
parent 9782275b2a
commit a08b909199
2 changed files with 8 additions and 7 deletions
+6 -6
View File
@@ -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}"
)
+2 -1
View File
@@ -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")