Skip to content

Commit 823565e

Browse files
committed
fix: don't quote executable in windows
1 parent 25c3d67 commit 823565e

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

lib/base-package-manager.ts

+6-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { isInteractive, quoteString } from "./common/helpers";
1+
import { isInteractive } from "./common/helpers";
22
import {
33
INodePackageManager,
44
INodePackageManagerInstallOptions,
@@ -108,19 +108,11 @@ export abstract class BasePackageManager implements INodePackageManager {
108108
): Promise<INpmInstallResultInfo> {
109109
const npmExecutable = this.getPackageManagerExecutableName();
110110
const stdioValue = isInteractive() ? "inherit" : "pipe";
111-
const sanitizedNpmExecutable = this.$hostInfo.isWindows
112-
? quoteString(npmExecutable)
113-
: npmExecutable;
114-
await this.$childProcess.spawnFromEvent(
115-
sanitizedNpmExecutable,
116-
params,
117-
"close",
118-
{
119-
cwd: opts.cwd,
120-
stdio: stdioValue,
121-
shell: this.$hostInfo.isWindows,
122-
}
123-
);
111+
await this.$childProcess.spawnFromEvent(npmExecutable, params, "close", {
112+
cwd: opts.cwd,
113+
stdio: stdioValue,
114+
shell: this.$hostInfo.isWindows,
115+
});
124116

125117
// Whenever calling "npm install" or "yarn add" without any arguments (hence installing all dependencies) no output is emitted on stdout
126118
// Luckily, whenever you call "npm install" or "yarn add" to install all dependencies chances are you won't need the name/version of the package you're installing because there is none.

0 commit comments

Comments
 (0)