Merge pull request #283 from mallman/launcher_version

Print the launcher version and exit if launched with exactly one argument named "--version"
This commit is contained in:
Mark Harrah 2011-12-06 17:41:41 -08:00
commit c2fc43cb4b
1 changed files with 8 additions and 3 deletions

View File

@ -10,9 +10,14 @@ object Boot
{
def main(args: Array[String])
{
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
CheckProxy()
run(args)
args match {
case Array("--version") =>
println("sbt launcher version " + Package.getPackage("xsbt.boot").getImplementationVersion)
case _ =>
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
CheckProxy()
run(args)
}
}
// this arrangement is because Scala 2.7.7 does not properly optimize away
// the tail recursion in a catch statement