Skip to content

Commit 98fee0d

Browse files
authored
Merge pull request microsoft#1826 from jkroepke/patch-1
[rush] Use `command` instead of `which`
2 parents acd14cd + b88859a commit 98fee0d

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

apps/rush-lib/src/scripts/install-run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export function getNpmPath(): string {
138138
_npmPath = lines[lines.length - 1];
139139
} else {
140140
// We aren't on Windows - assume we're on *NIX or Darwin
141-
_npmPath = childProcess.execSync('which npm', { stdio: [] }).toString();
141+
_npmPath = childProcess.execSync('command -v npm', { stdio: [] }).toString();
142142
}
143143
} catch (e) {
144144
throw new Error(`Unable to determine the path to the NPM tool: ${e}`);
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/rush",
5+
"comment": "Fix an issue where, on some minimal systems, Rush used a missing shell command to detect an application path.",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "mail@jkroepke.de"
11+
}

0 commit comments

Comments
 (0)