VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
551 stars 129 forks source link

Setting repositories using config repositories.default affects also local sbt #3231

Open jiramares opened 1 month ago

jiramares commented 1 month ago

Scala CLI version: 1.5.1

Setting default repositories using command scala-cli --power config repositories.default ivy2local https://out.server/repos/maven-proxy affect also repositories for sbt. It is expected behaviour.

It should change repositories only for scala-cli as performs setting environment variable COURSIER_REPOSITORIES.

Gedochao commented 1 month ago

Likely caused by the same thing as:

The repository config is shared between scala-cli and coursier, and SBT uses coursier under the hood as well... 😕

jiramares commented 1 month ago

But environment variable COURSIER_REPOSITORIES affect only coursier in scala_cli