exit 1 from kotlin process if compilation failed
This commit is contained in:
@@ -140,14 +140,15 @@ public class KotlinCompiler {
|
||||
environment.setStdlib(arguments.stdlib);
|
||||
}
|
||||
|
||||
boolean ok;
|
||||
if (arguments.module != null) {
|
||||
environment.compileModuleScript(arguments.module, arguments.jar, arguments.outputDir, arguments.includeRuntime);
|
||||
ok = environment.compileModuleScript(arguments.module, arguments.jar, arguments.outputDir, arguments.includeRuntime);
|
||||
}
|
||||
else {
|
||||
environment.compileBunchOfSources(arguments.src, arguments.jar, arguments.outputDir, arguments.includeRuntime);
|
||||
ok = environment.compileBunchOfSources(arguments.src, arguments.jar, arguments.outputDir, arguments.includeRuntime);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ok ? 0 : 1;
|
||||
}
|
||||
catch (Throwable t) {
|
||||
errStream.println(messageRenderer.renderException(t));
|
||||
|
||||
Reference in New Issue
Block a user