Skip to content

Commit 55b36ac

Browse files
committed
Fixed warning
1 parent b64b698 commit 55b36ac

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
strategy:
77
fail-fast: false
88
matrix:
9-
os: [ubuntu-24.04, ubuntu-24.04-arm, ubuntu-22.04, ubuntu-22.04-arm, macos-26, macos-15, macos-15-intel, macos-14, macos-13, windows-2025, windows-2022]
10-
elasticsearch-version: [9, 8]
9+
os: [ubuntu-24.04]
10+
elasticsearch-version: [9]
1111
steps:
1212
- uses: actions/checkout@v5
1313
- uses: ./.

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,14 @@ const versionMap = {
5050
'7.0': '7.0.1'
5151
};
5252

53+
const env = Object.assign({}, process.env);
54+
5355
function run() {
5456
const args = Array.from(arguments);
5557
console.log(args.join(' '));
5658
const command = args.shift();
5759
// spawn is safer and more lightweight than exec
58-
const ret = spawnSync(command, args, {stdio: 'inherit'});
60+
const ret = spawnSync(command, args, {stdio: 'inherit', env: env});
5961
if (ret.status !== 0) {
6062
throw ret.error;
6163
}
@@ -70,7 +72,7 @@ function runBat() {
7072
if (!fs.existsSync(command)) {
7173
throw 'Bat not found';
7274
}
73-
const ret = spawnSync(command, args, {stdio: 'inherit', shell: true});
75+
const ret = spawnSync(command, args, {stdio: 'inherit', env: env, shell: true});
7476
if (ret.status !== 0) {
7577
throw ret.error;
7678
}
@@ -256,6 +258,7 @@ if (javaHome) {
256258
} else {
257259
process.env.ES_JAVA_HOME = javaHome;
258260
addToEnv(`ES_JAVA_HOME=${javaHome}`);
261+
delete env.JAVA_HOME;
259262
}
260263
}
261264

0 commit comments

Comments
 (0)