Skip to content

Commit 89d6062

Browse files
authored
fix: prevent throw when args missing (#1288)
Fixes #1286
1 parent 372e6b2 commit 89d6062

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/config/load.js

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ function load(settings, options, config, callback) {
6969
if (!options.script && !options.exec) {
7070
var found = findAppScript();
7171
if (found) {
72+
if (!options.args) {
73+
options.args = [];
74+
}
7275
// if the script is found as a result of not being on the command
7376
// line, then we move any of the pre double-dash args in execArgs
7477
const n = options.scriptPosition || options.args.length;

0 commit comments

Comments
 (0)