You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GUI oriented Windows users might simply double click on the .bat scripts to run in interactive mode, which will launch a terminal window to run the script. If java is not found, the terminal window will immediately close without the user having a chance to actually read the error. Some users might not know/consider running via a command-line session (rather than double-clicking) to get around this. Adding a pause or timeout would be trivial and give users an opportunity to read the terminal output.
Submitting for discussion prior to PR per contribution guidelines
Examples:
if not defined JAVA_HOME (
set JAVA_EXEC=java
echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
+ pause
) else (
if not defined JAVA_HOME (
set JAVA_EXEC=java
echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
+ timeout 3
) else (
if not defined JAVA_HOME (
set JAVA_EXEC=java
echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable.
+ timeout 3 > NUL
) else (
Alternatively, we can add this to the end of the script to keep the window open regardless of the outcome.
GUI oriented Windows users might simply double click on the .bat scripts to run in interactive mode, which will launch a terminal window to run the script. If java is not found, the terminal window will immediately close without the user having a chance to actually read the error. Some users might not know/consider running via a command-line session (rather than double-clicking) to get around this. Adding a pause or timeout would be trivial and give users an opportunity to read the terminal output.
Submitting for discussion prior to PR per contribution guidelines
Examples:
if not defined JAVA_HOME ( set JAVA_EXEC=java echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. + pause ) else (
if not defined JAVA_HOME ( set JAVA_EXEC=java echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. + timeout 3 ) else (
if not defined JAVA_HOME ( set JAVA_EXEC=java echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. + timeout 3 > NUL ) else (
Alternatively, we can add this to the end of the script to keep the window open regardless of the outcome.
Examples:
"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%\config;%diagpath%\lib\* co.elastic.support.diagnostics.DiagnosticApp %* + timeout 3 endlocal
"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%\config;%diagpath%\lib\* co.elastic.support.diagnostics.DiagnosticApp %* + timeout 3 > NUL endlocal
The text was updated successfully, but these errors were encountered: