Skip to content

Commit

Permalink
Fix path slash failure in pickle updates jar
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Aug 18, 2020
1 parent 6078b60 commit 637559c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,12 @@ final class MixedAnalyzingCompiler(
val scalacOpts = pickleJarPair match {
case Some((originalJar, updatesJar)) =>
val path = originalJar.toString
// ^ Path#toString uses '\' on Windows
// but the path could've been specified with '/' in scalacOptions
val fwdSlashPath = path.replace('\\', '/')
config.currentSetup.options.scalacOptions.map {
case s if s == path => updatesJar.toString
case s => s
case s if s == path || s == fwdSlashPath => updatesJar.toString
case s => s
}
case _ => config.currentSetup.options.scalacOptions
}
Expand Down

0 comments on commit 637559c

Please sign in to comment.