Exit Windows scripts promptly on failure
When invoking the elasticsearch-env.bat or x-pack-env.bat batch scripts on Windows, if these scripts exits due to an error (e.g., Java can not be found, or the wrong version of Java is found), then the script exits. Sadly, on Windows, this does not also terminate the caller, instead returning control. This means we have to explicitly exit so that is what we do in this commit. Relates elastic/x-pack-elasticsearch#2126 Original commit: elastic/x-pack-elasticsearch@18645db62c
This commit is contained in:
parent
50b8a56d34
commit
a80b1e4de1
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
|
@ -6,9 +6,9 @@ rem you may not use this file except in compliance with the Elastic License.
|
|||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
call "%~dp0..\elasticsearch-env.bat"
|
||||
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
||||
|
||||
call "%~dp0x-pack-env.bat"
|
||||
call "%~dp0x-pack-env.bat" || exit /b 1
|
||||
|
||||
%JAVA% ^
|
||||
%ES_JAVA_OPTS% ^
|
||||
|
|
Loading…
Reference in New Issue