Skip to content

Commit

Permalink
[cli/dev] rely on commander for deduping argv (elastic#14181)
Browse files Browse the repository at this point in the history
In eb31780 I started combining custom argv with the process's argv, and naively used union to combine the lists. This breaks cli arguments that are supposed to be repeated and isn't necessary since commander handles parsing the argv and deduping/merging based on config.
  • Loading branch information
spalger authored and chrisronline committed Nov 20, 2017
1 parent 53cfa07 commit d479d41
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cli/cluster/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ export default class Worker extends EventEmitter {
this.clusterBinder = new BinderFor(cluster);
this.processBinder = new BinderFor(process);

const argv = _.union(baseArgv, opts.argv || []);
this.env = {
kbnWorkerType: this.type,
kbnWorkerArgv: JSON.stringify(argv)
kbnWorkerArgv: JSON.stringify(baseArgv.concat(opts.argv || []))
};
}

Expand Down

0 comments on commit d479d41

Please sign in to comment.