fix(quark): fix automated installation and check exit code of executed external commands (#2119)(PR #2216)
This commit is contained in:
@@ -151,6 +151,7 @@ public class QuarkManager {
|
||||
List<String> cmd = new ArrayList<>();
|
||||
cmd.add(getCommand("pip3"));
|
||||
cmd.add("install");
|
||||
cmd.add("setuptools");
|
||||
cmd.add("quark-engine");
|
||||
cmd.add("--upgrade");
|
||||
try {
|
||||
@@ -213,6 +214,10 @@ public class QuarkManager {
|
||||
} 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) {
|
||||
|
||||
Reference in New Issue
Block a user