Skip to content

Commit

Permalink
Repl demo: fix shell command error message
Browse files Browse the repository at this point in the history
  • Loading branch information
mattirn committed Apr 2, 2021
1 parent 9578418 commit 6b51104
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion demo/src/main/java/org/jline/demo/Repl.java
Expand Up @@ -163,7 +163,10 @@ private void executeCmnd(List<String> args) throws Exception {
int exitCode = process.waitFor();
th.join();
if (exitCode != 0) {
throw new Exception("Failed to execute: " + String.join(" ", args.subList(2, args.size())));
streamGobbler = new StreamGobbler(process.getErrorStream(), System.out::println);
th = new Thread(streamGobbler);
th.start();
th.join();
}
}

Expand Down

0 comments on commit 6b51104

Please sign in to comment.