From ea35a16645ec06a710bf4ef9a01c35839a24a075 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Wed, 2 May 2018 12:11:52 +0100 Subject: [PATCH] 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 --- distribution/src/bin/elasticsearch-env.bat | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distribution/src/bin/elasticsearch-env.bat b/distribution/src/bin/elasticsearch-env.bat index b0d015924b440..8bd5f24864e44 100644 --- a/distribution/src/bin/elasticsearch-env.bat +++ b/distribution/src/bin/elasticsearch-env.bat @@ -58,4 +58,7 @@ set ES_DISTRIBUTION_TYPE=${es.distribution.type} if not defined ES_TMPDIR ( set ES_TMPDIR=!TMP!\elasticsearch + if not exist "!ES_TMPDIR!" ( + mkdir "!ES_TMPDIR!" + ) )