Skip to content

Commit 038fca2

Browse files
committed
Create default ES_TMPDIR on Windows (#30325)
If the elasticsearch-env bash script chooses $ES_TMPDIR then it also creates the directory. This change makes elasticsearch-env.bat do the same thing: if %ES_TMPDIR% is chosen by the script then the script will ensure it exists, but if %ES_TMPDIR% is already set then the user is responsible for creating it. Relates #27609 Relates #28217
1 parent 88e07dd commit 038fca2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

distribution/src/bin/elasticsearch-env.bat

+3
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ set ES_DISTRIBUTION_TYPE=${es.distribution.type}
5858

5959
if not defined ES_TMPDIR (
6060
set ES_TMPDIR=!TMP!\elasticsearch
61+
if not exist "!ES_TMPDIR!" (
62+
mkdir "!ES_TMPDIR!"
63+
)
6164
)

0 commit comments

Comments
 (0)