fix error and new docs
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user