Permalink
Browse files

Friendly error message when command is omitted.

  • Loading branch information...
1 parent d801c98 commit 7827181cec995a76d36fdc4047e5a45645accfe8 @mfncooper mfncooper committed 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 7827181

Please sign in to comment.