From 567c9bd03a7669111fbba6eb6d1f12ed7cad5a1b Mon Sep 17 00:00:00 2001 From: Gar Date: Tue, 2 Feb 2021 09:11:21 -0800 Subject: [PATCH] fix(lib/npm): do not clobber config.execPath If we were not asked to clobber config.execPath, don't do it. Credit: @wraithgar Reviewed-by: @isaacs --- lib/npm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/npm.js b/lib/npm.js index 7a15a29b2fed..40aa9bbd9b50 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -173,8 +173,8 @@ const npm = module.exports = new class extends EventEmitter { if (node && node.toUpperCase() !== process.execPath.toUpperCase()) { log.verbose('node symlink', node) process.execPath = node + this.config.execPath = node } - this.config.execPath = node await this.config.load() this.argv = this.config.parsedArgv.remain