File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
compiler/test-coursier/dotty/tools/coursier Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -170,12 +170,16 @@ object CoursierScalaTests:
170170
171171 /** Get coursier script */
172172 @ BeforeClass def setup (): Unit =
173- val ver = execCmd(" uname" )._2.head.replace('L' , 'l' ).replace('D' , 'd' )
173+ val launcherLocation = " https://github.com/coursier/launchers/raw/master"
174+ val launcherName = execCmd(" uname" )._2.head.toLowerCase match
175+ case " linux" => " cs-x86_64-pc-linux"
176+ case " darwin" => " cs-x86_64-apple-darwin"
177+ case other => fail(s " Unsupported OS for coursier launcher: $other" )
174178
175179 def runAndCheckCmd (cmd : String , options : String * ): Unit =
176180 val (code, out) = execCmd(cmd, options* )
177181 if code != 0 then
178182 fail(s " Failed to run $cmd ${options.mkString(" " )}, exit code: $code, output: ${out.mkString(" \n " )}" )
179183
180- runAndCheckCmd(" curl" , s " -fLo cs https://git.io/coursier-cli- $ver " )
184+ runAndCheckCmd(" curl" , s " -fLo cs $launcherLocation / $launcherName " )
181185 runAndCheckCmd(" chmod" , " +x cs" )
You can’t perform that action at this time.
0 commit comments