Skip to content

Commit

Permalink
Add protocbridge.debug system property to help debug shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
thesamet committed Jan 24, 2021
1 parent 2a0d7d2 commit eb1c738
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ object PosixPluginFrontend extends PluginFrontend {
}

override def cleanup(state: InternalState): Unit = {
Files.delete(state.inputPipe)
Files.delete(state.outputPipe)
Files.delete(state.tempDir)
Files.delete(state.shellScript)
if (sys.props.get("protocbridge.debug") != Some("1")) {
Files.delete(state.inputPipe)
Files.delete(state.outputPipe)
Files.delete(state.tempDir)
Files.delete(state.shellScript)
}
}

private def createPipe(tempDirPath: Path, name: String): Path = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ object WindowsPluginFrontend extends PluginFrontend {
}

override def cleanup(state: InternalState): Unit = {
Files.delete(state.batFile)
if (sys.props.get("protocbridge.debug") != Some("1")) {
Files.delete(state.batFile)
}
}

private def createWindowsScript(port: Int): InternalState = {
Expand Down

0 comments on commit eb1c738

Please sign in to comment.