Skip to content

Commit 6e096df

Browse files
author
Devon Stewart
committed
Permitting tests to run on OSX
1 parent f455d20 commit 6e096df

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scalac-scoverage-plugin/src/test/scala/scoverage/ScoverageCompiler.scala

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ object ScoverageCompiler {
6666

6767
private def findCoursierJar(artifactId: String, version: String): Option[File] = {
6868
val userHome = System.getProperty("user.home")
69-
val jarPath = s"$userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar"
70-
val file = new File(jarPath)
71-
if (file.exists()) Some(file) else None
69+
val jarPaths = Seq(
70+
s"$userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar",
71+
s"$userHome/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/$artifactId/$version/$artifactId-$version.jar",
72+
)
73+
jarPaths.map(new File(_)).filter(_.exists()).headOption
7274
}
7375

7476
private def findIvyJar(groupId: String, artifactId: String, version: String, packaging: String = "jar"): Option[File] = {

0 commit comments

Comments
 (0)