Skip to content

Commit

Permalink
Use a ".bat" suffix for the downloaded mill executable (#98)
Browse files Browse the repository at this point in the history
Pull request: #98
  • Loading branch information
lefou authored Apr 12, 2022
1 parent 2c31b84 commit f3bee55
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,13 @@ trait MillIntegrationTestModule extends TaskModule with ExtraCoursierSupport wit
case MillVersion(0, 0 | 1 | 2 | 3 | 4, _, _, _) => ""
case _ => "-assembly"
}
val exeSuffix = if (scala.util.Properties.isWin) ".bat" else ""
val url = s"https://github.com/lihaoyi/mill/releases/download/${mainVersion.versionTag}/${fullVersion}${suffix}"

val cacheTarget = T.env
.get("XDG_CACHE_HOME")
.map(os.Path(_))
.getOrElse(os.home / ".cache") / "mill" / "download" / fullVersion
.getOrElse(os.home / ".cache") / "mill" / "download" / s"${fullVersion}${exeSuffix}"

if (useCachedMillDownload() && os.exists(cacheTarget)) {
PathRef(cacheTarget)
Expand Down

0 comments on commit f3bee55

Please sign in to comment.