Skip to content

Commit

Permalink
run-script: Check run script existence with undefined (#139)
Browse files Browse the repository at this point in the history
PR-URL: #139
Credit: @vlasy
Reviewed-By: @zkat
  • Loading branch information
vlasy authored and zkat committed Feb 18, 2019
1 parent 489c221 commit b8b8afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/run-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function run (pkg, wd, cmd, args, cb) {
'prestart', 'start', 'poststart'
]
} else {
if (!pkg.scripts[cmd]) {
if (pkg.scripts[cmd] == null) {
if (cmd === 'test') {
pkg.scripts.test = 'echo \'Error: no test specified\''
} else if (cmd === 'env') {
Expand Down

0 comments on commit b8b8afd

Please sign in to comment.