Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

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 Sep 26, 2017
1 parent 9ec5d90 commit 014dee0
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 014dee0

Please sign in to comment.