Skip to content

Commit

Permalink
Merge pull request #1388 from alexarchambault/config-proxy-keys
Browse files Browse the repository at this point in the history
Add HTTP proxy-related keys in config module
  • Loading branch information
alexarchambault authored Sep 22, 2022
2 parents 06f07dc + f6266fe commit 29bc194
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
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

0 comments on commit 29bc194

Please sign in to comment.