Skip to content

Commit 98138ba

Browse files
authored
Fix an issue with running npm commands. (#5546)
1 parent 549716c commit 98138ba

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "",
5+
"type": "none",
6+
"packageName": "@microsoft/rush"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "[email protected]"
11+
}

libraries/rush-lib/src/utilities/Npm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function runNpmCommandAndCaptureOutputAsync(
1919
captureExitCodeAndSignal: true
2020
});
2121

22-
if (signal !== undefined) {
22+
if (signal) {
2323
throw new Error(`The npm command was terminated by signal: ${signal}. Output: ${stdout} ${stderr}`);
2424
} else if (exitCode !== 0) {
2525
throw new Error(`The npm command failed with exit code: ${exitCode}. Output: ${stdout} ${stderr}`);

0 commit comments

Comments
 (0)