[kbn/es] avoid splitting string esArgs into separate args (#90253)

Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
Spencer 2021-02-03 21:58:28 -07:00 committed by GitHub
parent 23d5ffb44f
commit df4eb0f726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -235,7 +235,7 @@ exports.Cluster = class Cluster {
* @private
* @param {String} installPath
* @param {Object} options
* @property {Array} options.esArgs
* @property {string|Array} options.esArgs
* @return {undefined}
*/
_exec(installPath, options = {}) {
@ -246,7 +246,7 @@ exports.Cluster = class Cluster {
this._log.info(chalk.bold('Starting'));
this._log.indent(4);
const esArgs = ['action.destructive_requires_name=true', ...(options.esArgs || [])];
const esArgs = ['action.destructive_requires_name=true'].concat(options.esArgs || []);
// Add to esArgs if ssl is enabled
if (this._ssl) {