mirror of https://github.com/sbt/sbt.git
Move Coursier cache check
This commit is contained in:
parent
3c5b88a83a
commit
b111704620
|
|
@ -32,10 +32,6 @@ object MainLoop {
|
|||
/** Entry point to run the remaining commands in State with managed global logging.*/
|
||||
def runLogged(state: State): xsbti.MainResult = {
|
||||
|
||||
// This warns if ~/.coursier/cache is found.
|
||||
// Temporary, remove when updating coursier to 2.0.0 final.
|
||||
lmcoursier.CoursierConfiguration.checkLegacyCache()
|
||||
|
||||
// We've disabled jline shutdown hooks to prevent classloader leaks, and have been careful to always restore
|
||||
// the jline terminal in finally blocks, but hitting ctrl+c prevents finally blocks from being executed, in that
|
||||
// case the only way to restore the terminal is in a shutdown hook.
|
||||
|
|
|
|||
|
|
@ -37,10 +37,18 @@ object LMCoursier {
|
|||
private[this] val credentialRegistry: ConcurrentHashMap[(String, String), IvyCredentials] =
|
||||
new ConcurrentHashMap
|
||||
|
||||
private[this] lazy val checkLegacyCache: Unit = {
|
||||
// This warns if ~/.coursier/cache is found.
|
||||
// Temporary, remove when updating coursier to 2.0.0 final.
|
||||
lmcoursier.CoursierConfiguration.checkLegacyCache()
|
||||
}
|
||||
|
||||
def defaultCacheLocation: File =
|
||||
sys.props.get("sbt.coursier.home") match {
|
||||
case Some(home) => new File(home).getAbsoluteFile / "cache"
|
||||
case _ => CoursierDependencyResolution.defaultCacheLocation
|
||||
case _ =>
|
||||
checkLegacyCache
|
||||
CoursierDependencyResolution.defaultCacheLocation
|
||||
}
|
||||
|
||||
def relaxedForAllModules: Seq[(ModuleMatchers, Reconciliation)] =
|
||||
|
|
|
|||
Loading…
Reference in New Issue