diff --git a/infra/scripts/deploy-dev-to-prod.ps1 b/infra/scripts/deploy-dev-to-prod.ps1 index 25c1290..63d59c2 100644 --- a/infra/scripts/deploy-dev-to-prod.ps1 +++ b/infra/scripts/deploy-dev-to-prod.ps1 @@ -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 }