Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6063977

Browse files
KonTraxmads-hartmann
authored andcommitted
More reliable npm command execution on windows (#40)
More reliable npm command execution on windows Append '.cmd' extension when spawning child process for npm command on windows as '.cmd'/'.bat' files are not included when searching for executable by basename.
1 parent 955d35c commit 6063977

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎vscode-client/src/util.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ function isWindows() {
77

88
function getBasePath(): Promise<string> {
99
return new Promise((resolve, reject) => {
10-
execFile('npm', ['bin', '-g'], (err, stdout) => {
10+
const npmBin = isWindows() ? 'npm.cmd' : 'npm'
11+
execFile(npmBin, ['bin', '-g'], (err, stdout) => {
1112
if (err) {
1213
reject(err)
1314
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /