Skip to content

Commit

Permalink
fix(quark): fix automated installation and check exit code of execute…
Browse files Browse the repository at this point in the history
…d external commands (#2119)(PR #2216)
  • Loading branch information
jpstotz authored Jul 12, 2024
1 parent 730db0d commit 366225f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ private void installQuark() {
List<String> cmd = new ArrayList<>();
cmd.add(getCommand("pip3"));
cmd.add("install");
cmd.add("setuptools");
cmd.add("quark-engine");
cmd.add("--upgrade");
try {
Expand Down Expand Up @@ -213,6 +214,10 @@ private void runCommand(List<String> cmd) throws Exception {
} finally {
process.waitFor();
}
if (process.exitValue() != 0) {
throw new RuntimeException("Execution failed (exit code " + process.exitValue() + ") - command "
+ String.join(" ", cmd) + "\nPlease see command log output what was going wrong.");
}
}

private boolean checkCommand(String... cmd) {
Expand Down

0 comments on commit 366225f

Please sign in to comment.