summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorOlivier Melois <olivierm@cakesolutions.net>2018-04-05 11:46:21 +0100
committerOlivier Melois <olivierm@cakesolutions.net>2018-04-05 11:46:21 +0100
commit9dfcef234722d5d5151b8c30c0b92ee3fe642dfb (patch)
tree8fe5c3f1eb2a2e4d8b7ac8ba00bd4401069b839a /core
parenta96754b75c1fbf1959aeac59040588211f5327c2 (diff)
downloadmill-9dfcef234722d5d5151b8c30c0b92ee3fe642dfb.tar.gz
mill-9dfcef234722d5d5151b8c30c0b92ee3fe642dfb.tar.bz2
mill-9dfcef234722d5d5151b8c30c0b92ee3fe642dfb.zip
Adds test for client -> server map propagation
* Moved the `System.getenv` side effect to the end of the world * Adds a test to make sure that the `Map[String, String]` gets propagated correctly * Adds a `Ctx.Env` trait for consistency https://github.com/lihaoyi/mill/issues/257
Diffstat (limited to 'core')
-rw-r--r--core/src/mill/util/Ctx.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/mill/util/Ctx.scala b/core/src/mill/util/Ctx.scala
index 88a8baec..6c8b2afb 100644
--- a/core/src/mill/util/Ctx.scala
+++ b/core/src/mill/util/Ctx.scala
@@ -23,6 +23,9 @@ object Ctx{
trait Home{
def home: Path
}
+ trait Env{
+ def env: Map[String, String]
+ }
object Log{
implicit def logToCtx(l: Logger): Log = new Log { def log = l }
}
@@ -41,7 +44,8 @@ class Ctx(val args: IndexedSeq[_],
extends Ctx.Dest
with Ctx.Log
with Ctx.Args
- with Ctx.Home{
+ with Ctx.Home
+ with Ctx.Env {
def dest = dest0()
def length = args.length