mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-08 14:05:27 +00:00
a80b1e4de1
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
22 lines
569 B
Batchfile
22 lines
569 B
Batchfile
@echo off
|
|
|
|
rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
rem or more contributor license agreements. Licensed under the Elastic License;
|
|
rem you may not use this file except in compliance with the Elastic License.
|
|
|
|
setlocal enabledelayedexpansion
|
|
|
|
call "%~dp0..\elasticsearch-env.bat" || exit /b 1
|
|
|
|
call "%~dp0x-pack-env.bat" || exit /b 1
|
|
|
|
%JAVA% ^
|
|
%ES_JAVA_OPTS% ^
|
|
-Des.path.home="%ES_HOME%" ^
|
|
-Des.path.conf="%CONF_DIR%" ^
|
|
-cp "%ES_CLASSPATH%" ^
|
|
org.elasticsearch.xpack.security.crypto.tool.SystemKeyTool ^
|
|
%*
|
|
|
|
endlocal
|