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 authored and vlasy committed Jan 29, 2019
1 parent 550bf70 commit f8449d5
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 f8449d5

Please sign in to comment.