summaryrefslogtreecommitdiff
path: root/main/src/mill/Main.scala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/mill/Main.scala')
-rw-r--r--main/src/mill/Main.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/mill/Main.scala b/main/src/mill/Main.scala
index 6c10f6f2..a899c8c6 100644
--- a/main/src/mill/Main.scala
+++ b/main/src/mill/Main.scala
@@ -59,7 +59,7 @@ object Main {
val millArgSignature =
Cli.genericSignature.filter(a => !removed(a.name)) :+ interactiveSignature
- val millHome = home / ".mill" / "ammonite"
+ val millHome = mill.util.Ctx.defaultHome
Cli.groupArgs(
args.toList,
@@ -88,12 +88,14 @@ object Main {
stderr.println("Build repl needs to be run with the -i/--interactive flag")
(false, stateCache)
}else{
+ val tqs = "\"\"\""
val config =
if(!repl) cliConfig
else cliConfig.copy(
predefCode =
- """import $file.build, build._
+ s"""import $$file.build, build._
|implicit val replApplyHandler = mill.main.ReplApplyHandler(
+ | ammonite.ops.Path($tqs${cliConfig.home.toIO.getCanonicalPath.replaceAllLiterally("$", "$$")}$tqs),
| interp.colors(),
| repl.pprinter(),
| build.millSelf.get,