From 028477a9912d853c5d10dcf102b73b6f25751df2 Mon Sep 17 00:00:00 2001 From: danesh110 Date: Wed, 20 Jan 2021 17:56:33 +0330 Subject: [PATCH] Fix an error that occurs while starting the service in Windows OS under a path with a space in it (#61895) * Handle space in ES_HOME in elasticsearch_env.bat. Co-authored-by: Elastic Machine --- .gitignore | 3 +++ distribution/src/bin/elasticsearch-env.bat | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 024e3224397ab..4fed957c61871 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,9 @@ build/ # vscode stuff .vscode/ +# vs stuff +.vs/ + # testing stuff **/.local* .vagrant/ diff --git a/distribution/src/bin/elasticsearch-env.bat b/distribution/src/bin/elasticsearch-env.bat index 14e2a4e164b49..02f85ef118ac6 100644 --- a/distribution/src/bin/elasticsearch-env.bat +++ b/distribution/src/bin/elasticsearch-env.bat @@ -45,7 +45,7 @@ rem and allows to effectively force use of the bundled jdk when launching ES rem by setting JAVA_HOME= if "%JAVA_HOME%" == "" ( set JAVA="%ES_HOME%\jdk\bin\java.exe" - set JAVA_HOME="%ES_HOME%\jdk" + set "JAVA_HOME=%ES_HOME%\jdk" set JAVA_TYPE=bundled jdk ) else ( set JAVA="%JAVA_HOME%\bin\java.exe"