Skip to content

Commit

Permalink
If the command result contains "ERROR," the execution outcome is cons…
Browse files Browse the repository at this point in the history
…idered a failure.
  • Loading branch information
sjgllgh committed Jan 10, 2024
1 parent 5fc6414 commit 242e151
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ private Result executeCmd(String cmd) {
if (StringUtils.isBlank(res) && o != null) {
res = o.toString();
}
if (res.contains("ERROR: ")) {
return Result.failed(getStackTrace(new Throwable(new Exception(res))), new Exception(res));
}
return Result.ok(res);
} catch (Exception e) {
return Result.failed(getStackTrace(e), e);
Expand Down

0 comments on commit 242e151

Please sign in to comment.