[cli/dev] rely on commander for deduping argv (#14181)

In eb317804b5 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.

(cherry picked from commit 014dee07fa)
This commit is contained in:
Spencer 2017-09-26 13:37:17 -07:00 committed by spalger
parent 4bd9534e39
commit 3ef06eb9fe

View file

@ -39,10 +39,9 @@ module.exports = 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 || []))
};
}