Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGar <gar+gh@danger.computer>2021-06-08 01:55:25 +0300
committerGar <gar+gh@danger.computer>2021-06-16 00:52:28 +0300
commitc6a8734d7d6e4b6d061110a01e45e1d418d56489 (patch)
tree46841197e4aa40fcc1077abccd3959765f1ab841 /lib/cli.js
parente5abf2a2171d95bafc0993f337230d2b6633a6ed (diff)
chore(refactor): finish passing npm context
No more requiring npm as a singleton. This will now allow us to move forward with the other refactoring we need to always use the npm object itself in tests, not a mocked one. PR-URL: https://github.com/npm/cli/pull/3388 Credit: @wraithgar Close: #3388 Reviewed-by: @ruyadorno
Diffstat (limited to 'lib/cli.js')
-rw-r--r--lib/cli.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/cli.js b/lib/cli.js
index d4a676458..fbceb459d 100644
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -20,6 +20,7 @@ module.exports = (process) => {
const npm = require('../lib/npm.js')
const errorHandler = require('../lib/utils/error-handler.js')
+ errorHandler.setNpm(npm)
// if npm is called as "npmg" or "npm_g", then
// run in global mode.