diff --git a/lib/cli-entry.js b/lib/cli-entry.js index aad06e0690385..03fb7530ae404 100644 --- a/lib/cli-entry.js +++ b/lib/cli-entry.js @@ -57,7 +57,6 @@ module.exports = async (process, validateEngines) => { process.exitCode = 1 return exitHandler() } - await npm.exec(cmd) return exitHandler() } catch (err) { diff --git a/lib/npm.js b/lib/npm.js index 0a023f4ac8a30..cc9fc4c696889 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -12,7 +12,6 @@ const LogFile = require('./utils/log-file.js') const Timers = require('./utils/timers.js') const Display = require('./utils/display.js') const log = require('./utils/log-shim') -const replaceInfo = require('./utils/replace-info.js') const updateNotifier = require('./utils/update-notifier.js') const pkg = require('../package.json') const { deref } = require('./utils/cmd-list.js') @@ -227,6 +226,7 @@ class Npm { // note: this MUST be shorter than the actual argv length, because it // uses the same memory, so node will truncate it if it's too long. this.time('npm:load:setTitle', () => { + const replaceInfo = require('./utils/replace-info.js') const { parsedArgv: { cooked, remain } } = this.config this.argv = remain // Secrets are mostly in configs, so title is set using only the positional args diff --git a/lib/utils/replace-info.js b/lib/utils/replace-info.js index b9ce61935ffb7..d38a8f2fd8176 100644 --- a/lib/utils/replace-info.js +++ b/lib/utils/replace-info.js @@ -1,4 +1,4 @@ -const { cleanUrl } = require('npm-registry-fetch') +const cleanUrl = require('npm-registry-fetch/lib/clean-url') const isString = (v) => typeof v === 'string' // split on \s|= similar to how nopt parses options