From c32ef4de7d62d0b0ffdc360cac09f764d958262e Mon Sep 17 00:00:00 2001 From: alfeilex <101652401+alfeilex@users.noreply.github.com> Date: Thu, 16 Jan 2025 19:42:44 +0100 Subject: [PATCH] #894: Fix ide.bat printing for initialization and error output - revert goto for exit code (#932) --- cli/src/main/package/bin/ide.bat | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/cli/src/main/package/bin/ide.bat b/cli/src/main/package/bin/ide.bat index b3e8e0a33..6f6465324 100644 --- a/cli/src/main/package/bin/ide.bat +++ b/cli/src/main/package/bin/ide.bat @@ -21,7 +21,9 @@ if exist "%GIT_CORE%" ( if not "%1%" == "" ( ideasy %IDE_OPTIONS% %* - goto :output_error + if not %ERRORLEVEL% == 0 ( + echo %_fBRed%Error: IDEasy failed with exit code %ERRORLEVEL% %_RESET% + exit /b %ERRORLEVEL% ) REM https://stackoverflow.com/questions/61888625/what-is-f-in-the-for-loop-command @@ -34,9 +36,3 @@ ideasy %IDE_OPTIONS% env>nul if %ERRORLEVEL% == 0 ( echo IDE environment variables have been set for %IDE_HOME% in workspace %WORKSPACE% ) - -:output_error -if not %ERRORLEVEL% == 0 ( - echo %_fBRed%Error: IDEasy failed with exit code %ERRORLEVEL% %_RESET% - exit /b %ERRORLEVEL% -)