Skip to content

Commit

Permalink
Log command of forked process with info
Browse files Browse the repository at this point in the history
  • Loading branch information
adpi2 committed Nov 16, 2023
1 parent 82a815f commit 3cc5a42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/src/main/scala/bloop/exec/Forker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ object Forker {
val envMap = builder.environment()
envMap.putAll(env.asJava)
builder.redirectErrorStream(false)
logger.info("Forking process:")
logger.info("- working directory: " + cwd.map(_.toString).getOrElse("null"))
logger.info("- command line: " + cmd.mkString(" "))
val envFormatted = env.map { case (key, value) => s" $key=$value" }.mkString("\n")
logger.info("- environment variables:\n" + envFormatted)
builder.start()
}.flatMap { ps =>
val writeIn = writeToStdIn(ps.getOutputStream)
Expand Down

0 comments on commit 3cc5a42

Please sign in to comment.