Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for: Coursier not resilient to changing local ivy cache directory #665 #705

Merged
merged 5 commits into from Dec 6, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion cache/src/main/scala/coursier/Cache.scala
Expand Up @@ -1073,8 +1073,14 @@ object Cache {
}

private lazy val ivy2HomeUri = {

val path =
sys.props.get("coursier.ivy.home")
.orElse(sys.props.get("ivy.home"))
.getOrElse(sys.props("user.home") + "/.ivy2/")

// a bit touchy on Windows... - don't try to manually write down the URI with s"file://..."
val str = new File(sys.props("user.home") + "/.ivy2/").toURI.toString
val str = new File(path).toURI.toString
if (str.endsWith("/"))
str
else
Expand Down