Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ private boolean isRoot(String name) {
return name.endsWith("@workspace:.");
}

@Override
public String parseDepTreeOutput(String output) {
return "[" + output.trim().replace(System.lineSeparator(), "").replace("}{", "},{") + "]";
}
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/redhat/exhort/tools/Operations.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,13 @@ public static String runProcessGetOutput(Path dir, final String[] cmdList, Strin
}

String stdout = new String(process.getInputStream().readAllBytes());
String stderr = new String(process.getErrorStream().readAllBytes());

// TODO: This should throw an exception if the process fails
if (!stderr.isBlank()) {
return stderr.trim();
if (!stdout.isBlank()) {
return stdout.trim();
}
return stdout.trim();
// TODO: This should throw an exception if the process fails
String stderr = new String(process.getErrorStream().readAllBytes());
return stderr.trim();
} catch (IOException e) {
throw new RuntimeException(
String.format("Failed to execute command '%s' ", join(" ", cmdList)), e);
Expand Down
Loading