Skip to content

Commit

Permalink
Check run script existence with undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Vlasák committed Jan 18, 2019
1 parent 36682d4 commit 46ec600
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] === undefined) {
if (cmd === 'test') {
pkg.scripts.test = 'echo \'Error: no test specified\''
} else if (cmd === 'env') {
Expand Down

0 comments on commit 46ec600

Please sign in to comment.