From 18ab91d23a7fdcee1865ea375ed1cfba5349a9c0 Mon Sep 17 00:00:00 2001 From: Martijn Laarman Date: Thu, 15 Mar 2018 13:18:36 +0100 Subject: [PATCH] Fix ##29057 CWD to ES_HOME does not change drive The /d switch on cd also changes the current drive in DOS. This allows the bat file to be called while the users CWD is on a different drive. --- distribution/src/bin/elasticsearch.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/src/bin/elasticsearch.bat b/distribution/src/bin/elasticsearch.bat index f9f668fc61538..e0f52c54c627f 100644 --- a/distribution/src/bin/elasticsearch.bat +++ b/distribution/src/bin/elasticsearch.bat @@ -50,7 +50,7 @@ if "%MAYBE_JVM_OPTIONS_PARSER_FAILED%" == "jvm_options_parser_failed" ( exit /b 1 ) -cd "%ES_HOME%" +cd /d "%ES_HOME%" %JAVA% %ES_JAVA_OPTS% -Delasticsearch -Des.path.home="%ES_HOME%" -Des.path.conf="%ES_PATH_CONF%" -cp "%ES_CLASSPATH%" "org.elasticsearch.bootstrap.Elasticsearch" !newparams! endlocal