diff options
Diffstat (limited to 'lib/npm.js')
-rw-r--r-- | lib/npm.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/npm.js b/lib/npm.js index d80067a11..78b6ba034 100644 --- a/lib/npm.js +++ b/lib/npm.js @@ -38,6 +38,7 @@ const proxyCmds = new Proxy({}, { const { definitions, flatten, shorthands } = require('./utils/config/index.js') const { shellouts } = require('./utils/cmd-list.js') +const usage = require('./utils/npm-usage.js') let warnedNonDashArg = false const _runCmd = Symbol('_runCmd') @@ -100,7 +101,7 @@ const npm = module.exports = new class extends EventEmitter { } if (this.config.get('usage')) { - console.log(impl.usage) + this.output(impl.usage) cb() } else { impl.exec(args, er => { @@ -274,6 +275,10 @@ const npm = module.exports = new class extends EventEmitter { this[k] = r } + get usage () { + return usage(this) + } + // XXX add logging to see if we actually use this get tmp () { if (!this[_tmpFolder]) { |