Skip to content

Commit

Permalink
fix: npm run-script fails silently. closes npm#2959
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Nov 25, 2012
1 parent fd2eb72 commit 7678f93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/run-script.js
Expand Up @@ -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)/)) {
Expand Down

0 comments on commit 7678f93

Please sign in to comment.