Fix validateBuild failing due to npm output capture

Ensure Invoke-Npm streams output to host and returns only exit code.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila KhodjaefandCursor committed 2026-07-08 17:32:49 +03:00
1 parent 4361178413
commit 9e28f3db3f
1 file changed
+4 -1
+4 -1
View File
@@ -55,7 +55,10 @@ function Invoke-Npm {
$args += '--'
$args += $ExtraArgs
}
& npm @args
# Prevent npm stdout/stderr from becoming pipeline output for the caller.
# Without this, callers that assign the function result to a variable can
# accidentally capture npm's printed output instead of only exit code.
& npm @args 2>&1 | Out-Host
return $LASTEXITCODE
}