Set variable in Windows scripts to default value

This commit sets the bad_env_var to a default value of 0 so that in case
no bad environment variables are encountered the variable is still
defined and does not later cause a parse error in the execution of these
batch files.

Relates #17675
This commit is contained in:
Jason Tedor 2016-04-13 12:17:36 -04:00
parent 0b889f1a8f
commit f4ccf9bd4f
2 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@ TITLE Elasticsearch ${project.version}
SET params='%*'
rem TODO: remove for Elasticsearch 6.x
set bad_env_var=0
if not "%ES_MIN_MEM%" == "" set bad_env_var=1
if not "%ES_MAX_MEM%" == "" set bad_env_var=1
if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1

View File

@ -4,6 +4,7 @@ SETLOCAL enabledelayedexpansion
TITLE Elasticsearch Service ${project.version}
rem TODO: remove for Elasticsearch 6.x
set bad_env_var=0
if not "%ES_MIN_MEM%" == "" set bad_env_var=1
if not "%ES_MAX_MEM%" == "" set bad_env_var=1
if not "%ES_HEAP_SIZE%" == "" set bad_env_var=1