Skip to content

Commit

Permalink
fix elastic#38578 env bat quoting issue
Browse files Browse the repository at this point in the history
When %JAVA% gets inferred from %PATH% trying to resolve %ES_TMPDIR% failed.

If %JAVA_HOME% was set explicitly this did not cause an error.
  • Loading branch information
Mpdreamz committed Feb 8, 2019
1 parent 5988b44 commit 94f596d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion distribution/src/bin/elasticsearch-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ set ES_DISTRIBUTION_FLAVOR=${es.distribution.flavor}
set ES_DISTRIBUTION_TYPE=${es.distribution.type}

if not defined ES_TMPDIR (
for /f "tokens=* usebackq" %%a in (`"%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory""`) do set ES_TMPDIR=%%a
for /f "tokens=* usebackq" %%a in ('%JAVA% -cp "!ES_CLASSPATH!" "org.elasticsearch.tools.launchers.TempDirectory"') do set ES_TMPDIR=%%a
)

0 comments on commit 94f596d

Please sign in to comment.