Skip to content

Commit

Permalink
🐛 fix exec reading stderr instead of stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
pron committed Aug 30, 2015
1 parent f737660 commit 5e0477c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capsule/src/main/java/Capsule.java
Expand Up @@ -4760,7 +4760,7 @@ protected static List<String> exec(int numLines, ProcessBuilder pb) throws IOExc
final List<String> lines = new ArrayList<>();
final Process p = pb.start();

try (BufferedReader reader = new BufferedReader(new InputStreamReader(p.getErrorStream(), Charset.defaultCharset()))) {
try (BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream(), Charset.defaultCharset()))) {
for (int i = 0; numLines < 0 || i < numLines; i++) {
final String line = reader.readLine();
if (line == null)
Expand Down

0 comments on commit 5e0477c

Please sign in to comment.