Skip to content

Commit

Permalink
fix: prevent throw when args missing (#1288)
Browse files Browse the repository at this point in the history
Fixes #1286
  • Loading branch information
remy authored Mar 13, 2018
1 parent 372e6b2 commit 89d6062
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/config/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ function load(settings, options, config, callback) {
if (!options.script && !options.exec) {
var found = findAppScript();
if (found) {
if (!options.args) {
options.args = [];
}
// if the script is found as a result of not being on the command
// line, then we move any of the pre double-dash args in execArgs
const n = options.scriptPosition || options.args.length;
Expand Down

0 comments on commit 89d6062

Please sign in to comment.