Compiler output stream fixed

Exit code 1 not reported in the IDE
This commit is contained in:
Andrey Breslav
2012-03-06 16:53:45 +04:00
parent 0c19d3add9
commit 26519c74f1
3 changed files with 10 additions and 6 deletions
@@ -147,15 +147,15 @@ public class KotlinCompiler {
environment.addToClasspath(arguments.classpath);
}
boolean ok;
boolean noErrors;
if (arguments.module != null) {
ok = environment.compileModuleScript(arguments.module, arguments.jar, arguments.outputDir, arguments.includeRuntime);
noErrors = environment.compileModuleScript(arguments.module, arguments.jar, arguments.outputDir, arguments.includeRuntime);
}
else {
ok = environment.compileBunchOfSources(arguments.src, arguments.jar, arguments.outputDir, arguments.includeRuntime);
noErrors = environment.compileBunchOfSources(arguments.src, arguments.jar, arguments.outputDir, arguments.includeRuntime);
}
return ok ? 0 : 1;
return noErrors ? 0 : 1;
}
catch (Throwable t) {
errStream.println(messageRenderer.renderException(t));
@@ -181,6 +181,8 @@ public class CompileEnvironment {
final String directory = new File(moduleScriptFile).getParent();
for (Module moduleBuilder : modules) {
CompileEnvironment compileEnvironment = new CompileEnvironment(myFileNameTransformer, myMessageRenderer);
compileEnvironment.setIgnoreErrors(ignoreErrors);
compileEnvironment.setErrorStream(myErrorStream);
// copy across any compiler plugins
compileEnvironment.getMyEnvironment().getCompilerPlugins().addAll(myEnvironment.getCompilerPlugins());
ClassFileFactory moduleFactory = compileEnvironment.compileModule(moduleBuilder, directory);