Skip to content

Commit 4a6e487

Browse files
committed
Updated InstallRushOnlyIfNeeded.js to deal with NPM 5 exit codes
1 parent f94d4b8 commit 4a6e487

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

common/scripts/InstallRushOnlyIfNeeded.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ let installedVersion = undefined;
8686
console.log(os.EOL + `Expected Rush version is ${expectedVersion}`);
8787

8888
try {
89-
const output = child_process.execSync(`"${npmPath}" list ${packageName} version`,
89+
const spawnResult = child_process.spawnSync(npmPath, ['list', packageName, 'version'],
9090
{ cwd: rushPath, stdio: ['pipe', 'pipe', 'pipe'] });
91-
const matches = /@microsoft\/rush\@([0-9a-zA-Z.+\-]+)/.exec(output);
91+
const matches = /@microsoft\/rush\@([0-9a-zA-Z.+\-]+)/.exec(spawnResult.output);
9292
if (matches && matches.length === 2) {
9393
installedVersion = matches[1];
9494
}

0 commit comments

Comments
 (0)