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

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-es/src/cluster.js
This commit is contained in:
Spencer 2021-02-03 23:52:51 -07:00 committed by GitHub
parent 80b018e6e8
commit a3b55577b1
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,8 +246,7 @@ exports.Cluster = class Cluster {
this._log.info(chalk.bold('Starting'));
this._log.indent(4);
const esArgs = options.esArgs || [];
const esArgs = [].concat(options.esArgs || []);
// Add to esArgs if ssl is enabled
if (this._ssl) {
esArgs.push('xpack.security.http.ssl.enabled=true');