Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

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


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

0 comments on commit fc4dc8f

Please sign in to comment.