Merge pull request #30095 from Microsoft/nodeExecFileSync

Do not wrap npm path with quotes
This commit is contained in:
Sheetal Nandi 2019-02-26 09:10:22 -08:00 committed by GitHub
commit 4db4c58924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,10 +89,6 @@ namespace ts.server.typingsInstaller {
log);
this.npmPath = npmLocation !== undefined ? npmLocation : getDefaultNPMLocation(process.argv[0]);
// If the NPM path contains spaces and isn't wrapped in quotes, do so.
if (stringContains(this.npmPath, " ") && this.npmPath[0] !== `"`) {
this.npmPath = `"${this.npmPath}"`;
}
if (this.log.isEnabled()) {
this.log.writeLine(`Process id: ${process.pid}`);
this.log.writeLine(`NPM location: ${this.npmPath} (explicit '${Arguments.NpmLocation}' ${npmLocation === undefined ? "not " : ""} provided)`);