summaryrefslogtreecommitdiff
path: root/main/src/mill/main/MainRunner.scala
diff options
context:
space:
mode:
authorOlivier Melois <olivierm@cakesolutions.net>2018-03-29 21:03:27 +0100
committerOlivier Melois <olivierm@cakesolutions.net>2018-03-29 21:12:55 +0100
commita96754b75c1fbf1959aeac59040588211f5327c2 (patch)
tree75e2d6c69c2e28d4500505da002ea387f2771027 /main/src/mill/main/MainRunner.scala
parent41ca6c22894e863f5042cd8f49f5c3c6d52acc23 (diff)
downloadmill-a96754b75c1fbf1959aeac59040588211f5327c2.tar.gz
mill-a96754b75c1fbf1959aeac59040588211f5327c2.tar.bz2
mill-a96754b75c1fbf1959aeac59040588211f5327c2.zip
Adds envVars propagation client -> server
Since Mill now executes in a long-lived JVM, the builds do not have a chance to use environment variables as inputs. This propagates the environment variables from the client all the way down to the context available to the tasks as a `Map[String, String]` so that they can be used as inputs should the user choose to do so. https://github.com/lihaoyi/mill/issues/257
Diffstat (limited to 'main/src/mill/main/MainRunner.scala')
-rw-r--r--main/src/mill/main/MainRunner.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/mill/main/MainRunner.scala b/main/src/mill/main/MainRunner.scala
index efebd5a5..fed664fd 100644
--- a/main/src/mill/main/MainRunner.scala
+++ b/main/src/mill/main/MainRunner.scala
@@ -20,7 +20,8 @@ class MainRunner(val config: ammonite.main.Cli.Config,
outprintStream: PrintStream,
errPrintStream: PrintStream,
stdIn: InputStream,
- stateCache0: Option[Evaluator.State] = None)
+ stateCache0: Option[Evaluator.State] = None,
+ env : Map[String, String])
extends ammonite.MainRunner(
config, outprintStream, errPrintStream,
stdIn, outprintStream, errPrintStream
@@ -75,7 +76,8 @@ class MainRunner(val config: ammonite.main.Cli.Config,
errPrintStream,
errPrintStream,
stdIn
- )
+ ),
+ env
)
result match{