From 93cce7224e43d3c13a01fdad41020dd1841f548c Mon Sep 17 00:00:00 2001 From: chenxi Date: Mon, 28 Sep 2026 10:35:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20macOS=20=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=20PATH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build-frontend.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build-frontend.ps1 b/scripts/build-frontend.ps1 index 42b12ca8..6f49e0af 100644 --- a/scripts/build-frontend.ps1 +++ b/scripts/build-frontend.ps1 @@ -239,7 +239,7 @@ if (-not (Test-Path -LiteralPath $nodeExe) -or -not (Test-Path -LiteralPath $npm throw "The project-local Node $NodeVersion installation is incomplete." } -$originalPath = $env:Path +$originalPath = $env:PATH $originalNodeOptions = $env:NODE_OPTIONS $originalBuildTarget = $env:CAIWU_BUILD_TARGET $originalTerserWorkers = $env:CAIWU_TERSER_WORKERS @@ -252,7 +252,7 @@ else { Push-Location $repoRoot try { - $env:Path = "$(if ($IsWindows) { $nodeRoot } else { Join-Path $nodeRoot 'bin' })$([IO.Path]::PathSeparator)$originalPath" + $env:PATH = "$(if ($IsWindows) { $nodeRoot } else { Join-Path $nodeRoot 'bin' })$([IO.Path]::PathSeparator)$originalPath" $env:NODE_OPTIONS = "--max-old-space-size=$MaxOldSpaceSizeMB" $env:CAIWU_TERSER_WORKERS = $TerserWorkers.ToString() @@ -375,7 +375,7 @@ try { } finally { Pop-Location - $env:Path = $originalPath + $env:PATH = $originalPath $env:NODE_OPTIONS = $originalNodeOptions $env:CAIWU_BUILD_TARGET = $originalBuildTarget $env:CAIWU_TERSER_WORKERS = $originalTerserWorkers