File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1+ set windows-shell := [" powershell.exe" , " -NoLogo" , " -Command" ]
12
23default :
34 just --list
Original file line number Diff line number Diff line change 1+ import java .util .Locale
2+
13import scala .concurrent .duration .*
24
35import fs2 .*
@@ -22,6 +24,9 @@ sealed trait BuildTool
2224class ScalaCli extends BuildTool
2325class Mill extends BuildTool
2426
27+ private lazy val isWindows : Boolean =
28+ System .getProperty(" os.name" ).toLowerCase(Locale .ENGLISH ).contains(" windows" )
29+
2530def buildRunner (
2631 tool : BuildTool ,
2732 linkingTopic : Topic [IO , Unit ],
@@ -66,7 +71,7 @@ def buildRunnerScli(
6671 .flatMap(
6772 _ =>
6873 ProcessBuilder (
69- " scala-cli" ,
74+ if isWindows then " scala-cli.bat " else " scala-cli" ,
7075 scalaCliArgs
7176 ).withWorkingDirectory(workDir)
7277 .spawn[IO ]
@@ -135,7 +140,7 @@ def buildRunnerMill(
135140 ) ++ extraBuildArgs
136141 // TODO pipe this to stdout so that we can see linker progress / errors.
137142 val builder = ProcessBuilder (
138- " mill" ,
143+ if isWindows then " mill.bat " else " mill" ,
139144 millargs
140145 ).withWorkingDirectory(workDir)
141146 .spawn[IO ]
You can’t perform that action at this time.
0 commit comments