Permalink
Browse files

Friendly error message when command is omitted.

  • Loading branch information...
1 parent 6e5805b commit fc4dc8fa4197c87e7ceeabc1306170fd9ff0ff1a @mfncooper mfncooper committed with isaacs Sep 1, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/run-script.js
View
@@ -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()

0 comments on commit fc4dc8f

Please sign in to comment.