Skip to content

Commit f8449d5

Browse files
Michal Vlasákvlasy
authored andcommitted
Check run script existence with undefined
1 parent 550bf70 commit f8449d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/run-script.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ function run (pkg, wd, cmd, args, cb) {
136136
'prestart', 'start', 'poststart'
137137
]
138138
} else {
139-
if (!pkg.scripts[cmd]) {
139+
if (pkg.scripts[cmd] === undefined) {
140140
if (cmd === 'test') {
141141
pkg.scripts.test = 'echo \'Error: no test specified\''
142142
} else if (cmd === 'env') {

0 commit comments

Comments
 (0)