Skip to content

The agent that grows with you

fix(install): preserve Node PATH readiness guard

Gille4572dbf09014
diff --git a/scripts/install.ps1 b/scripts/install.ps1
index 06d9dd67275..2347310ec73 100644
--- a/scripts/install.ps1
+++ b/scripts/install.ps1
@@ -1676,12 +1676,13 @@ function Test-SystemNodeReady {
if (-not (Get-Command node -ErrorAction SilentlyContinue)) { return $false }
$version = node --version
- if (-not (Test-NodeVersionOk $version)) {
+ if (Test-NodeVersionOk $version) {
+ Ensure-NodeExeOnPath | Out-Null
+ } else {
Write-Warn "Node.js $version is too old (Hermes requires Node >=22.22.0)"
return $false
}
- Ensure-NodeExeOnPath | Out-Null
$npmRange = Get-NpmRange
$npmCmd = Get-Command npm.cmd -ErrorAction SilentlyContinue
if (-not $npmCmd) {