fix error and new docs

This commit is contained in:
Ivan Fontosh
2026-05-18 10:16:48 +08:00
parent 10de99bb06
commit 1cda87fe13
+10 -1
View File
@@ -56,12 +56,21 @@ function Invoke-NpmRaw {
[string[]]$NpmArgs,
[string]$WorkingDirectory
)
$prevEap = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
Push-Location $WorkingDirectory
try {
& npm @NpmArgs
& npm @NpmArgs 2>&1 | ForEach-Object {
if ($_ -is [System.Management.Automation.ErrorRecord]) {
Write-Host $_.ToString()
} else {
Write-Host ([string]$_)
}
}
return $LASTEXITCODE
} finally {
Pop-Location
$ErrorActionPreference = $prevEap
}
}