mirror of https://github.com/sbt/sbt.git
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:
commit
c2fc43cb4b
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue