Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix the child process debug commands order
  • Loading branch information
sergeypospelov committed Aug 18, 2022
commit 869c9f0dc949198e1fd1c4c5ce82c35bb82c7bb2
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,11 @@ private var processSeqN = 0

class ChildProcessRunner {
private val cmds: List<String> by lazy {
val debugCmd = if (Settings.runChildProcessWithDebug) {
listOf(DEBUG_RUN_CMD)
} else {
emptyList()
}

listOf(
JdkInfoService.provide().path.resolve("bin${File.separatorChar}java").toString(),
"-javaagent:$jarFile", "-ea", "-jar", "$jarFile"
) + debugCmd
val pathToJava = JdkInfoService.provide().path
val debugCmd = listOfNotNull(DEBUG_RUN_CMD.takeIf { Settings.runChildProcessWithDebug })
listOf(pathToJava.resolve("bin${File.separatorChar}java").toString()) +
debugCmd +
listOf("-javaagent:$jarFile", "-ea", "-jar", "$jarFile")
}

var errorLogFile: File = NULL_FILE
Expand Down