From 9e28f3db3fa54165cd42cfb893cfbfbd7bf9061d Mon Sep 17 00:00:00 2001 From: Danila Khodjaef Date: Wed, 8 Jul 2026 17:32:49 +0300 Subject: [PATCH] Fix validateBuild failing due to npm output capture Ensure Invoke-Npm streams output to host and returns only exit code. Co-authored-by: Cursor --- infra/scripts/deploy-dev-to-prod.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 }