Skip to content

Commit 6164dbb

Browse files
Log command to be run in Jvm.callProcess when debugging is enabled (com-lihaoyi#4792)
(Context is I'm currently having issues running specific tests on the main branch, and I was hoping `--debug` would help me, but it doesn't 😅)
1 parent 0bc8f57 commit 6164dbb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

main/util/src/mill/util/Jvm.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object Jvm {
7777
shutdownGracePeriod: Long = 100,
7878
destroyOnExit: Boolean = true,
7979
check: Boolean = true
80-
): CommandResult = {
80+
)(implicit ctx: Ctx): CommandResult = {
8181
val cp = cpPassingJarPath match {
8282
case Some(passingJarPath) if classPath.nonEmpty =>
8383
createClasspathPassingJar(passingJarPath, classPath.toSeq)
@@ -96,6 +96,10 @@ object Jvm {
9696

9797
if (cwd != null) os.makeDir.all(cwd)
9898

99+
ctx.log.debug(
100+
s"Running ${commandArgs.map(arg => "'" + arg.replace("'", "'\"'\"'") + "'").mkString(" ")}"
101+
)
102+
99103
val processResult = os.proc(commandArgs)
100104
.call(
101105
cwd = cwd,

0 commit comments

Comments
 (0)