mirror of https://github.com/sbt/sbt.git
Add support for a deep reload where the configuration is reread
This commit is contained in:
parent
67f8fc5c06
commit
200581abc0
|
|
@ -12,16 +12,21 @@ object Boot
|
|||
{
|
||||
System.clearProperty("scala.home") // avoid errors from mixing Scala versions in the same JVM
|
||||
CheckProxy()
|
||||
run(args)
|
||||
System.exit(0)
|
||||
}
|
||||
def run(args: Array[String])
|
||||
{
|
||||
try { Launch(args.toList) }
|
||||
catch
|
||||
{
|
||||
case b: BootException => errorAndExit(b.toString)
|
||||
case r: xsbti.RetrieveException =>errorAndExit("Error: " + r.getMessage)
|
||||
case r: xsbti.FullReload => run(r.arguments)
|
||||
case e =>
|
||||
e.printStackTrace
|
||||
errorAndExit(Pre.prefixError(e.toString))
|
||||
}
|
||||
System.exit(0)
|
||||
}
|
||||
private def errorAndExit(msg: String)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package xsbti;
|
||||
|
||||
public final class FullReload extends RuntimeException
|
||||
{
|
||||
private final String[] arguments;
|
||||
public FullReload(String[] arguments)
|
||||
{
|
||||
this.arguments = arguments;
|
||||
}
|
||||
public String[] arguments() { return arguments; }
|
||||
}
|
||||
Loading…
Reference in New Issue