From d3057a2fc51bf162250e16b593b02bde0c693166 Mon Sep 17 00:00:00 2001 From: SCOPEDD Date: Thu, 1 Oct 2026 01:11:04 -0400 Subject: [PATCH] Fix Windows Node version detection in runner setup --- scripts/ci/install-windows.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/install-windows.ps1 b/scripts/ci/install-windows.ps1 index 5ab6a3c..ea1b7c2 100644 --- a/scripts/ci/install-windows.ps1 +++ b/scripts/ci/install-windows.ps1 @@ -35,7 +35,7 @@ Add-RunnerPath (Split-Path $pwsh) Write-Host "PowerShell $(& $pwsh -NoProfile -Command '$PSVersionTable.PSVersion.ToString()') is ready." $node = Get-Command node.exe -ErrorAction SilentlyContinue -$nodeMajor = if ($node) { [int](& node -p 'process.versions.node.split(".")[0]') } else { 0 } +$nodeMajor = if ($node) { [int]((& node --version).TrimStart('v').Split('.')[0]) } else { 0 } if ($nodeMajor -lt 22) { $nodeVersion = '22.23.3' $nodeArchive = Join-Path $env:RUNNER_TEMP "node-v$nodeVersion-win-x64.zip" @@ -81,5 +81,5 @@ Write-Host "Microsoft C++ Build Tools are ready at $vsPath." foreach ($tool in @('cargo.exe', 'rustc.exe', 'node.exe', 'npm.cmd')) { if (-not (Get-Command $tool -ErrorAction SilentlyContinue)) { throw "Missing $tool after dependency setup." } } -if ([int](& node -p 'process.versions.node.split(".")[0]') -lt 22) { throw 'Node 22+ is required.' } +if ([int]((& node --version).TrimStart('v').Split('.')[0]) -lt 22) { throw 'Node 22+ is required.' } Write-Host "Windows $Mode dependencies are ready."