Fix npm stderr crash on Windows ErrorActionPreference
This commit is contained in:
parent
662a1eb9d5
commit
2dfe0abaa1
1 changed files with 5 additions and 0 deletions
|
|
@ -390,10 +390,15 @@ if ($IsPipInstall) {
|
|||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "Building frontend..." -ForegroundColor Cyan
|
||||
# npm writes warnings to stderr; lower ErrorActionPreference so PS doesn't
|
||||
# treat them as terminating errors (same pattern as the pip section below).
|
||||
$prevEAP_npm = $ErrorActionPreference
|
||||
$ErrorActionPreference = "Continue"
|
||||
Push-Location $FrontendDir
|
||||
npm install 2>&1 | Out-Null
|
||||
npm run build 2>&1 | Out-Null
|
||||
Pop-Location
|
||||
$ErrorActionPreference = $prevEAP_npm
|
||||
Write-Host "[OK] Frontend built to studio/frontend/dist" -ForegroundColor Green
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue