Skip to content

scala-cli --power config repositories.default doesn't override global default repo since 1.15.0 #4392

Description

@geny200

Version(s)
1.15.0 (for 1.14.0 and earlier - OK)

Describe the bug
Hi. We get a problem in our infrastructure: we use private artifactory (as proxy for maven), and on gitlab runner we restrict access to the public Internet. So starting from version 1.15.0, for some reason, the repositories defined via config repositories.default and env COURSIER_REPOSITORIES stopped working - by default, when downloading "Downloading compilation server 2.1.0" (log after commad run), first attempt is "central.sonatype.com ", then "repo.scala-lang.org " and only after all those attempts fail does it try our artifactory.

To Reproduce
We use virtuslab/scala-cli:1.15.0 as base image for gitlab runner, so I'll show how to reproduce at that docker image. <repo> - url for our artifactory

docker run -it  --entrypoint /bin/bash --env COURSIER_REPOSITORIES=<repo> --rm virtuslab/scala-cli:1.15.0
echo -e "//> using scala 3.8.4\n\n@main def foo(): Unit = {}" > test.scala
scala-cli --power config repositories.default <repo>
scala-cli run test.scala

so after start run - cli uses resolvers fst: "central.sonatype.com ", snd: "repo.scala-lang.org ", low priority: <repo>

Expected behaviour
I expects scala-cli would use <repo> (provided by env COURSIER_REPOSITORIES and command scala-cli --power config repositories.default ) as first priority resolver

Metadata

Metadata

Assignees

Labels

BloopIssues tied with Bloop integration.bugSomething isn't workingdependency managementIssues tied to how the CLI manages project dependencies.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions