From d4c792d0ee8854d9ef3db376239637139c5478b8 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Thu, 26 Jun 2014 01:55:18 +0400 Subject: [PATCH] Fix errorlevel returned by kotlinc-*.bat scripts Propagate errorlevel returned as an exit code from the compiler to the outside world. This may not work on Windows XP or earlier, but is required for Windows 7+ --- compiler/cli/bin/kotlinc-js.bat | 2 +- compiler/cli/bin/kotlinc-jvm.bat | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cli/bin/kotlinc-js.bat b/compiler/cli/bin/kotlinc-js.bat index 94f88d39908..1e10d6b228d 100644 --- a/compiler/cli/bin/kotlinc-js.bat +++ b/compiler/cli/bin/kotlinc-js.bat @@ -42,7 +42,7 @@ if "%_PROFILE_PRELOADER%"=="time" ( org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ org.jetbrains.jet.cli.js.K2JSCompiler 4096 %_PROFILE_PRELOADER% %* ) -exit %ERRORLEVEL% +exit /b %ERRORLEVEL% goto end rem ########################################################################## diff --git a/compiler/cli/bin/kotlinc-jvm.bat b/compiler/cli/bin/kotlinc-jvm.bat index 0d7591e5490..b8c86a00438 100644 --- a/compiler/cli/bin/kotlinc-jvm.bat +++ b/compiler/cli/bin/kotlinc-jvm.bat @@ -42,7 +42,7 @@ if "%_PROFILE_PRELOADER%"=="time" ( org.jetbrains.jet.preloading.Preloader "%_KOTLIN_HOME%\lib\kotlin-compiler.jar;%_KOTLIN_HOME%\lib\kotlin-runtime.jar" ^ org.jetbrains.jet.cli.jvm.K2JVMCompiler 4096 %_PROFILE_PRELOADER% %* ) -exit %ERRORLEVEL% +exit /b %ERRORLEVEL% goto end rem ##########################################################################