From 916dcc20ee81d40ae264ecf102c47a3e2697a917 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Mon, 13 Aug 2018 19:40:32 +0800 Subject: move forkWorkingDir from TestModule onto JavaModule so it can apply to run/runBackground --- scalalib/src/mill/scalalib/JavaModule.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scalalib/src/mill/scalalib/JavaModule.scala b/scalalib/src/mill/scalalib/JavaModule.scala index 0a26cf9e..83008d94 100644 --- a/scalalib/src/mill/scalalib/JavaModule.scala +++ b/scalalib/src/mill/scalalib/JavaModule.scala @@ -336,7 +336,7 @@ trait JavaModule extends mill.Module with TaskModule { outer => forkArgs(), forkEnv(), Seq(procId.toString, procTombstone.toString, token, mainClass) ++ args, - workingDir = ammonite.ops.pwd, + workingDir = forkWorkingDir, background = true )) catch { case e: InteractiveShelloutException => Result.Failure("subprocess failed") @@ -358,7 +358,7 @@ trait JavaModule extends mill.Module with TaskModule { outer => forkArgs(), forkEnv(), args, - workingDir = ammonite.ops.pwd + workingDir = forkWorkingDir )) catch { case e: InteractiveShelloutException => Result.Failure("subprocess failed") } @@ -371,14 +371,14 @@ trait JavaModule extends mill.Module with TaskModule { outer => def artifactId: T[String] = artifactName() def intellijModulePath: Path = millSourcePath + + def forkWorkingDir = ammonite.ops.pwd } trait TestModule extends JavaModule with TaskModule { override def defaultCommandName() = "test" def testFrameworks: T[Seq[String]] - def forkWorkingDir = ammonite.ops.pwd - def test(args: String*) = T.command{ val outputPath = T.ctx().dest/"out.json" -- cgit v1.2.3