sbt/launch/Boot.scala

31 lines
587 B
Scala
Raw Normal View History

2009-08-21 14:12:43 +02:00
/* sbt -- Simple Build Tool
* Copyright 2009 Mark Harrah
*/
package xsbt.boot
import java.io.File
// The entry point to the launcher
object Boot
{
def main(args: Array[String])
{
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
2009-08-21 14:12:43 +02:00
CheckProxy()
2009-10-18 04:40:02 +02:00
try { Launch(args.toList) }
2009-08-21 14:12:43 +02:00
catch
{
2009-12-11 03:04:51 +01:00
case b: BootException => errorAndExit(b.toString)
2009-08-21 14:12:43 +02:00
case e =>
e.printStackTrace
2009-12-11 03:04:51 +01:00
errorAndExit(Pre.prefixError(e.toString))
2009-08-21 14:12:43 +02:00
}
System.exit(0)
}
2009-12-11 03:04:51 +01:00
private def errorAndExit(msg: String)
2009-08-21 14:12:43 +02:00
{
2009-12-11 03:04:51 +01:00
System.out.println(msg)
2009-08-21 14:12:43 +02:00
System.exit(1)
}
}