Skip to content

Commit

Permalink
Fix linux terminal opening process error (#8891)
Browse files Browse the repository at this point in the history
* test linux terminal

* use stream gobbler on terminal process
  • Loading branch information
Siedlerchr authored Jun 6, 2022
1 parent 45b40a7 commit 082e9cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/org/jabref/gui/desktop/os/Linux.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ public void openConsole(String absolutePath, DialogService dialogService) throws

ProcessBuilder builder = new ProcessBuilder(cmd);
builder.directory(new File(absolutePath));
builder.start();
Process processTerminal = builder.start();

StreamGobbler streamGobblerInput = new StreamGobbler(process.getInputStream(), LOGGER::debug);
StreamGobbler streamGobblerError = new StreamGobbler(process.getErrorStream(), LOGGER::debug);
StreamGobbler streamGobblerInput = new StreamGobbler(processTerminal.getInputStream(), LOGGER::debug);
StreamGobbler streamGobblerError = new StreamGobbler(processTerminal.getErrorStream(), LOGGER::debug);

JabRefExecutorService.INSTANCE.execute(streamGobblerInput);
JabRefExecutorService.INSTANCE.execute(streamGobblerError);
Expand Down

0 comments on commit 082e9cf

Please sign in to comment.