Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check run script existence with undefined
Browse files Browse the repository at this point in the history
Michal Vlasák authored and vlasy committed Jan 29, 2019

Verified

This commit was signed with the committer’s verified signature.
abelsromero Abel Salgado Romero
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
@@ -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') {

0 comments on commit f8449d5

Please sign in to comment.