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:
parent
0b889f1a8f
commit
f4ccf9bd4f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue