summaryrefslogtreecommitdiff
path: root/core/src/main/scala/mill/main/MainRunner.scala
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2017-12-31 22:56:45 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-01-01 10:10:19 -0800
commitcf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1 (patch)
treef3897463b6f55019f2bbd59ba5cff73cf0fb571f /core/src/main/scala/mill/main/MainRunner.scala
parent6996c01a391cb9aaa27268dd1f0cf0a1749ade21 (diff)
downloadmill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.tar.gz
mill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.tar.bz2
mill-cf5fb5fdfd477e0bb4ffa0e4fec3a8ec01bf5cf1.zip
Split Acyclic/Jawn/BetterFiles tests into their own `integration/` test suite.
Those tests now download a snapshot of the relevant git repo rather than vendoring the files, and use a bare `build.sc` instead of having the build object be included in the test classpath. Tests pass using `sbt integration/test`, but `mill integration.test` still doesn't work
Diffstat (limited to 'core/src/main/scala/mill/main/MainRunner.scala')
-rw-r--r--core/src/main/scala/mill/main/MainRunner.scala10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/src/main/scala/mill/main/MainRunner.scala b/core/src/main/scala/mill/main/MainRunner.scala
index 8f58f114..869975bc 100644
--- a/core/src/main/scala/mill/main/MainRunner.scala
+++ b/core/src/main/scala/mill/main/MainRunner.scala
@@ -11,8 +11,7 @@ import upickle.Js
* `build.sc` scripts with mill-specific tweaks such as a custom
* `scriptCodeWrapper` or with a persistent evaluator between runs.
*/
-class MainRunner(config: ammonite.main.Cli.Config,
- show: Boolean)
+class MainRunner(config: ammonite.main.Cli.Config, show: Boolean)
extends ammonite.MainRunner(
config,
System.out, System.err, System.in, System.out, System.err
@@ -72,7 +71,12 @@ class MainRunner(config: ammonite.main.Cli.Config,
}
override def initMain(isRepl: Boolean) = {
- super.initMain(isRepl).copy(scriptCodeWrapper = mill.main.MainRunner.CustomCodeWrapper)
+ super.initMain(isRepl).copy(
+ scriptCodeWrapper = mill.main.MainRunner.CustomCodeWrapper,
+ // Ammonite does not properly forward the wd from CliConfig to Main, so
+ // force forward it outselves
+ wd = config.wd
+ )
}
}