mirror of https://github.com/sbt/sbt.git
No unnecessary warning message with the launch command
when using the proguarded coursier launcher
This commit is contained in:
parent
6e5bdd80a1
commit
1ef56e9f49
|
|
@ -13,6 +13,7 @@ import coursier.util.Parse
|
|||
|
||||
import scala.annotation.tailrec
|
||||
import scala.language.reflectiveCalls
|
||||
import scala.util.Try
|
||||
|
||||
case class CommonOptions(
|
||||
@Help("Keep optional dependencies (Maven)")
|
||||
|
|
@ -228,7 +229,9 @@ case class Launch(
|
|||
|
||||
val contextLoader = Thread.currentThread().getContextClassLoader
|
||||
|
||||
val parentLoader0: ClassLoader = Launch.mainClassLoader(contextLoader)
|
||||
val parentLoader0: ClassLoader =
|
||||
if (Try(contextLoader.loadClass("coursier.Launch")).isSuccess)
|
||||
Launch.mainClassLoader(contextLoader)
|
||||
.flatMap(cl => Option(cl.getParent))
|
||||
.getOrElse {
|
||||
if (common.verbose0 >= 0)
|
||||
|
|
@ -240,6 +243,9 @@ case class Launch(
|
|||
)
|
||||
contextLoader
|
||||
}
|
||||
else
|
||||
// proguarded -> no risk of conflicts, no need to find a specific ClassLoader
|
||||
contextLoader
|
||||
|
||||
val (parentLoader, filteredFiles) =
|
||||
if (isolated.isolated.isEmpty)
|
||||
|
|
|
|||
Loading…
Reference in New Issue