aboutsummaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-04-29 01:30:20 -0400
committerChristopher Vogt <oss.nsp@cvogt.org>2016-04-29 01:30:20 -0400
commitb73873c2ce394ad8be08af03fcf41efc0338c291 (patch)
tree27c3a5eb9fe806694be53bf6ecc349c036d1a570 /stage2
parent3f2b9430c2de4641fdb1126d3d4e1556de1504b6 (diff)
downloadcbt-b73873c2ce394ad8be08af03fcf41efc0338c291.tar.gz
cbt-b73873c2ce394ad8be08af03fcf41efc0338c291.tar.bz2
cbt-b73873c2ce394ad8be08af03fcf41efc0338c291.zip
fix exit code return
Diffstat (limited to 'stage2')
-rw-r--r--stage2/Stage2.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/stage2/Stage2.scala b/stage2/Stage2.scala
index 83b660e..417808d 100644
--- a/stage2/Stage2.scala
+++ b/stage2/Stage2.scala
@@ -52,13 +52,13 @@ object Stage2 extends Stage2Base{
val first = lib.loadRoot( context )
val build = first.finalBuild
- def call(build: BuildInterface) = {
+ def call(build: BuildInterface): ExitCode = {
if(cross){
- build.crossScalaVersions.foreach{
+ build.crossScalaVersions.map{
v => new lib.ReflectBuild(
build.copy(context.copy(scalaVersion = Some(v)))
).callNullary(task)
- }
+ }.filter(_ != ExitCode.Success).headOption getOrElse ExitCode.Success
} else {
new lib.ReflectBuild(build).callNullary(task)
}
@@ -85,9 +85,9 @@ object Stage2 extends Stage2Base{
call(build)
}
} else {
- call(build)
+ val code = call(build)
+ logger.stage2(s"Stage2 end")
+ System.exit(code.integer)
}
-
- logger.stage2(s"Stage2 end")
}
}