summaryrefslogtreecommitdiff
path: root/deps/npm/lib/help.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/help.js')
-rw-r--r--deps/npm/lib/help.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/npm/lib/help.js b/deps/npm/lib/help.js
index 9763d5fccd..64c80f7874 100644
--- a/deps/npm/lib/help.js
+++ b/deps/npm/lib/help.js
@@ -12,6 +12,7 @@ var npm = require('./npm.js')
var log = require('npmlog')
var opener = require('opener')
var glob = require('glob')
+var didYouMean = require('./utils/did-you-mean')
var cmdList = require('./config/cmd-list').cmdList
var shorthands = require('./config/cmd-list').shorthands
var commands = cmdList.concat(Object.keys(shorthands))
@@ -181,6 +182,11 @@ function npmUsage (valid, cb) {
'',
'npm@' + npm.version + ' ' + path.dirname(__dirname)
].join('\n'))
+
+ if (npm.argv.length > 1) {
+ didYouMean(npm.argv[1], commands)
+ }
+
cb(valid)
}