Skip to content

Commit

Permalink
Friendly error message when command is omitted.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfncooper committed Sep 1, 2012
1 parent d801c98 commit 7827181
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/run-script.js
Expand Up @@ -67,6 +67,7 @@ runScript.completion = function (opts, cb) {
}

function runScript (args, cb) {
if (!args.length) return cb(runScript.usage)
var pkgdir = args.length === 1 ? process.cwd()
: path.resolve(npm.dir, args[0])
, cmd = args.pop()
Expand Down

0 comments on commit 7827181

Please sign in to comment.