Fix Zinc component compiler to respect -Dsbt.ivy.home

This is currently blocking the new nightly process.
This commit is contained in:
Eugene Yokota 2019-12-29 16:19:25 -05:00
parent 73b4d4b158
commit f5090cf70f
1 changed files with 7 additions and 1 deletions

View File

@ -159,7 +159,13 @@ private[sbt] object ZincComponentCompiler {
): CompilerBridgeProvider =
new ZincCompilerBridgeProvider(None, manager, dependencyResolution, scalaJarsTarget)
private final val LocalIvy = s"$${user.home}/.ivy2/local/${Resolver.localBasePattern}"
private final val LocalIvy =
(sys.props.get("sbt.ivy.home") match {
case Some(home) =>
if (home.endsWith("/")) home
else home + "/"
case _ => s"$${user.home}/.ivy2/"
}) + "local/" + Resolver.localBasePattern
final val LocalResolver: Resolver = {
val toUse = Vector(LocalIvy)