diff --git a/common/changes/@microsoft/rush/fix-rush-publish_2026-01-12-19-17.json b/common/changes/@microsoft/rush/fix-rush-publish_2026-01-12-19-17.json new file mode 100644 index 0000000000..efcd84c45f --- /dev/null +++ b/common/changes/@microsoft/rush/fix-rush-publish_2026-01-12-19-17.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "", + "type": "none", + "packageName": "@microsoft/rush" + } + ], + "packageName": "@microsoft/rush", + "email": "iclanton@users.noreply.github.com" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/utilities/Npm.ts b/libraries/rush-lib/src/utilities/Npm.ts index 1e9c83627a..c031831cd9 100644 --- a/libraries/rush-lib/src/utilities/Npm.ts +++ b/libraries/rush-lib/src/utilities/Npm.ts @@ -19,7 +19,7 @@ async function runNpmCommandAndCaptureOutputAsync( captureExitCodeAndSignal: true }); - if (signal !== undefined) { + if (signal) { throw new Error(`The npm command was terminated by signal: ${signal}. Output: ${stdout} ${stderr}`); } else if (exitCode !== 0) { throw new Error(`The npm command failed with exit code: ${exitCode}. Output: ${stdout} ${stderr}`);