mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[6.8] [kbn/es] use an ES_TMPDIR that is within the install pat… (#47971)
* [kbn/es] use an ES_TMPDIR that is within the install path * support tests which don't pass installPath # Conflicts: # packages/kbn-es/src/cluster.js # packages/kbn-es/src/install/archive.js
This commit is contained in:
parent
c5889c7475
commit
5c42bd7c25
2 changed files with 8 additions and 0 deletions
|
@ -238,6 +238,10 @@ exports.Cluster = class Cluster {
|
|||
|
||||
this._process = execa(ES_BIN, args, {
|
||||
cwd: installPath,
|
||||
env: {
|
||||
...(installPath ? { ES_TMPDIR: path.resolve(installPath, 'ES_TMPDIR') } : {}),
|
||||
...process.env,
|
||||
},
|
||||
stdio: ['ignore', 'pipe', 'pipe'],
|
||||
});
|
||||
|
||||
|
|
|
@ -62,6 +62,10 @@ exports.installArchive = async function installArchive(archive, options = {}) {
|
|||
await decompress(dest, installPath);
|
||||
log.info('extracted to %s', chalk.bold(installPath));
|
||||
|
||||
const tmpdir = path.resolve(installPath, 'ES_TMPDIR');
|
||||
fs.mkdirSync(tmpdir, { recursive: true });
|
||||
log.info('created %s', chalk.bold(tmpdir));
|
||||
|
||||
if (license === 'trial') {
|
||||
// starting in 6.3, security is disabled by default. Since we bootstrap
|
||||
// the keystore, we can enable security ourselves.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue