aboutsummaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
Diffstat (limited to 'stage2')
-rw-r--r--stage2/BasicBuild.scala1
-rw-r--r--stage2/Lib.scala5
-rw-r--r--stage2/Scaffold.scala2
3 files changed, 5 insertions, 3 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala
index 4ae4cd1..ee552a5 100644
--- a/stage2/BasicBuild.scala
+++ b/stage2/BasicBuild.scala
@@ -190,6 +190,7 @@ class BasicBuild(val context: Context) extends DependencyImplementation with Bui
def c = compile
def t = test
+ def r = run
def rt = recursiveUnsafe(Some("test"))
/*
diff --git a/stage2/Lib.scala b/stage2/Lib.scala
index 1b19a5e..8063e2b 100644
--- a/stage2/Lib.scala
+++ b/stage2/Lib.scala
@@ -197,8 +197,9 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
case scala.util.Failure(e) if Option(e.getMessage).getOrElse("") contains "toConsole" =>
value match {
- case code:ExitCode =>
- code
+ case code if code.getClass.getSimpleName == "ExitCode" =>
+ // FIXME: ExitCode needs to be part of the compatibility interfaces
+ ExitCode(Stage0Lib.get(code,"integer").asInstanceOf[Int])
case other =>
println( other.toString ) // no method .toConsole, using to String
ExitCode.Success
diff --git a/stage2/Scaffold.scala b/stage2/Scaffold.scala
index a9db667..1f3d515 100644
--- a/stage2/Scaffold.scala
+++ b/stage2/Scaffold.scala
@@ -17,7 +17,7 @@ trait Scaffold{
projectDirectory: File
): Unit = {
createFile(projectDirectory, "Main.scala", s"""object Main{
- def main( args: Array[String] ) = {
+ def main( args: Array[String] ): Unit = {
println( Console.GREEN ++ "Hello World" ++ Console.RESET )
}
}