Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTTP proxy-related keys in config module #1388

Merged
merged 2 commits into from
Sep 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/config/src/main/scala/scala/cli/config/Key.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import scala.cli.config.Util._

/** A configuration key
*/
sealed abstract class Key[T] {
abstract class Key[T] {

/** Key prefix, such as "foo.a" in "foo.a.b" */
def prefix: Seq[String]
Expand Down
9 changes: 8 additions & 1 deletion modules/config/src/main/scala/scala/cli/config/Keys.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ object Keys {

val interactive = new Key.BooleanEntry(Seq.empty, "interactive")

val proxyAddress = new Key.StringEntry(Seq("httpProxy"), "address")
val proxyUser = new Key.PasswordEntry(Seq("httpProxy"), "user")
val proxyPassword = new Key.PasswordEntry(Seq("httpProxy"), "password")

// setting indicating if the global interactive mode was suggested
val globalInteractiveWasSuggested = new Key.BooleanEntry(Seq.empty, "interactive-was-suggested")

Expand All @@ -34,7 +38,10 @@ object Keys {
pgpSecretKeyPassword,
pgpPublicKey,
sonatypeUser,
sonatypePassword
sonatypePassword,
proxyAddress,
proxyUser,
proxyPassword
)

lazy val map: Map[String, Key[_]] = all.map(e => e.fullName -> e).toMap
Expand Down