This commit is contained in:
Guillaume Nodet
2020-11-16 11:23:16 +01:00
parent 66e9c94f9d
commit 7879a057a5

View File

@@ -366,11 +366,13 @@ public class DefaultClient implements Client {
@Override
public ExecutionResult assertSuccess() {
if (exception != null) {
throw new AssertionError(ExecutionResult.appendCommand(new StringBuilder("Build failed: "), args).toString(), exception);
throw new AssertionError(ExecutionResult.appendCommand(new StringBuilder("Build failed: "), args).toString(),
exception);
}
if (exitCode != 0) {
throw new AssertionError(
ExecutionResult.appendCommand(new StringBuilder("Build exited with non-zero exit code " + exitCode + ": "), args).toString(),
ExecutionResult.appendCommand(
new StringBuilder("Build exited with non-zero exit code " + exitCode + ": "), args).toString(),
exception);
}
return this;