Skip to content

Commit 69eb521

Browse files
committed
Shouldn't error when no scripts key in package.json
Fixes #6
1 parent 63164de commit 69eb521

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cli.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ findPkg()
3535
.then(function (data) {
3636
// Assign global variables:
3737
pkg = data;
38+
if (!pkg.scripts) pkg.scripts = {};
3839
scripts = pkg.scripts;
3940
})
4041
.then(getScriptName)

0 commit comments

Comments
 (0)