File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
modules/cli/src/main/scala/scala/cli/commands/util Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,22 @@ import scala.cli.commands.FmtOptions
5
5
import scala .cli .commands .util .SharedOptionsUtil ._
6
6
import scala .util .Properties
7
7
8
+ import coursier .core .Version
9
+
8
10
object FmtOptionsUtil {
9
11
implicit class FmtOptionsOps (v : FmtOptions ) {
10
12
import v ._
11
13
def binaryUrl (version : String ): (String , Boolean ) = {
12
14
val osArchSuffix0 = osArchSuffix.map(_.trim).filter(_.nonEmpty)
13
15
.getOrElse(FetchExternalBinary .platformSuffix())
14
- val tag0 = scalafmtTag.getOrElse(" v" + version)
15
- val gitHubOrgName0 = scalafmtGithubOrgName.getOrElse(" alexarchambault/scalafmt-native-image" )
16
- val extension0 = if (Properties .isWin) " .zip" else " .gz"
16
+ val tag0 = scalafmtTag.getOrElse(" v" + version)
17
+ val gitHubOrgName0 = scalafmtGithubOrgName.getOrElse {
18
+ if (Version (version) < Version (" 3.5.9" ))
19
+ " scala-cli/scalafmt-native-image"
20
+ else // from version 3.5.9 scalafmt-native-image repository was moved to VirtusLab organisation
21
+ " virtuslab/scalafmt-native-image"
22
+ }
23
+ val extension0 = if (Properties .isWin) " .zip" else " .gz"
17
24
val url =
18
25
s " https://github.com/ $gitHubOrgName0/releases/download/ $tag0/scalafmt- $osArchSuffix0$extension0"
19
26
(url, ! tag0.startsWith(" v" ))
You can’t perform that action at this time.
0 commit comments