mirror of https://github.com/sbt/sbt.git
Message when initializing cache
This commit is contained in:
parent
7f774319e6
commit
72d29f5223
|
|
@ -108,6 +108,7 @@ case class Coursier(
|
|||
CachePolicy.Default
|
||||
|
||||
val cache = Cache.default
|
||||
cache.init(verbose = verbose0 >= 0)
|
||||
|
||||
val repositoryIds = {
|
||||
val repository0 = repository
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ case class Repositories(
|
|||
}
|
||||
|
||||
if (!cache.cache.exists())
|
||||
cache.init()
|
||||
cache.init(verbose = true)
|
||||
|
||||
val current = cache.list().map(_._1).toSet
|
||||
|
||||
|
|
|
|||
|
|
@ -63,8 +63,13 @@ case class Cache(cache: File) {
|
|||
def addIvy2Local(): Unit =
|
||||
add("ivy2local", new File(sys.props("user.home") + "/.ivy2/local/").toURI.toString, ivyLike = true)
|
||||
|
||||
def init(ifEmpty: Boolean = true): Unit =
|
||||
def init(
|
||||
ifEmpty: Boolean = true,
|
||||
verbose: Boolean = false
|
||||
): Unit =
|
||||
if (!ifEmpty || !cache.exists()) {
|
||||
if (verbose)
|
||||
Console.err.println(s"Initializing $cache")
|
||||
repoDir.mkdirs()
|
||||
metadataBase.mkdirs()
|
||||
fileBase.mkdirs()
|
||||
|
|
|
|||
Loading…
Reference in New Issue