Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix: npm run-script fails silently. closes #2959

  • Loading branch information...
commit 7678f931eaa87eda09f8b54c4c4f09c324b40c66 1 parent fd2eb72
@andrewrk authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/run-script.js
View
4 lib/run-script.js
@@ -86,6 +86,10 @@ function run (pkg, wd, cmd, cb) {
,"restart"
,"prestart","start","poststart"]
} else {
+ if (!pkg.scripts[cmd]) {
+ cb(new Error("missing script: " + cmd));
+ return;
+ }
cmds = [cmd]
}
if (!cmd.match(/^(pre|post)/)) {
Please sign in to comment.
Something went wrong with that request. Please try again.