diff options
author | Alexandra Dima <alexandra.dima@jetbrains.com> | 2019-07-23 10:39:26 +0200 |
---|---|---|
committer | Samvel Abrahamyan <samvel1024@gmail.com> | 2019-10-12 14:33:07 +0200 |
commit | 5ea90651ba6be7c3ea86f1d3123fa6af5b2f9ca8 (patch) | |
tree | c4f77763935c6860fd7e0ba8a65dc38b7097f29d | |
parent | 88bed3805d01eebb9193684074a35f0298f124ce (diff) | |
download | mill-5ea90651ba6be7c3ea86f1d3123fa6af5b2f9ca8.tar.gz mill-5ea90651ba6be7c3ea86f1d3123fa6af5b2f9ca8.tar.bz2 mill-5ea90651ba6be7c3ea86f1d3123fa6af5b2f9ca8.zip |
Updated the clean cache method of the mill build server to use system properties in order to assemble the correct, OS-independent, mill clean command.
-rw-r--r-- | contrib/bsp/src/mill/contrib/bsp/MillBuildServer.scala | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/contrib/bsp/src/mill/contrib/bsp/MillBuildServer.scala b/contrib/bsp/src/mill/contrib/bsp/MillBuildServer.scala index 9c74f2f0..e5319b77 100644 --- a/contrib/bsp/src/mill/contrib/bsp/MillBuildServer.scala +++ b/contrib/bsp/src/mill/contrib/bsp/MillBuildServer.scala @@ -405,7 +405,14 @@ class MillBuildServer(evaluator: Evaluator, var cleaned = true for (targetId <- cleanCacheParams.getTargets.asScala) { val module = targetIdToModule(targetId) - val process = Runtime.getRuntime.exec(s"mill clean ${module.millModuleSegments.render}.compile") + val cleanCommand = List("java", + s"-DMILL_CLASSPATH=${System.getProperty("MILL_CLASSPATH")}", + s"-DMILL_VERSION=${System.getProperty("MILL_VERSION")}", + "-Djna.nosys=true", "-cp", + System.getProperty("MILL_CLASSPATH"), + "mill.MillMain", "clean", + s"${module.millModuleSegments.render}.compile") + val process = Runtime.getRuntime.exec(cleanCommand.mkString(" ")) val processIn = process.getInputStream val processErr = process.getErrorStream |