Permalink
Browse files

Merge pull request #2772 from mfncooper/fix_run_no_command

Improved error message when runScript command is omitted
  • Loading branch information...
2 parents 77c792d + 7827181 commit 5a97efa2fa8e47323421febe46c8e8936bfd3deb @mfncooper mfncooper committed Sep 16, 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 5a97efa

Please sign in to comment.