mirror of https://github.com/sbt/sbt.git
Print the launcher version and exit if it's passed exactly one argument named "--version"
This commit is contained in:
parent
2f52884df8
commit
c0b4764683
|
|
@ -10,9 +10,15 @@ object Boot
|
||||||
{
|
{
|
||||||
def main(args: Array[String])
|
def main(args: Array[String])
|
||||||
{
|
{
|
||||||
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
|
args match {
|
||||||
CheckProxy()
|
case Array("--version") =>
|
||||||
run(args)
|
println("sbt launcher version " + Package.getPackage("xsbt.boot").getImplementationVersion)
|
||||||
|
exit(0)
|
||||||
|
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
|
// this arrangement is because Scala 2.7.7 does not properly optimize away
|
||||||
// the tail recursion in a catch statement
|
// the tail recursion in a catch statement
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue