Skip to content

Commit b0b83c0

Browse files
committed
ToolExecBase: Ignore exit value by default
It is up to implementations to call `ExecResult#assertNormalExitValue` and/or `ExecResult#rethrowFailure` if the exit code of the process needs to be validated.
1 parent fdc870d commit b0b83c0

File tree

1 file changed

+2
-0
lines changed
  • gradleutils-shared/src/main/java/net/minecraftforge/gradleutils/shared

1 file changed

+2
-0
lines changed

gradleutils-shared/src/main/java/net/minecraftforge/gradleutils/shared/ToolExecBase.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ protected ExecResult exec() {
158158
var stdOutLevel = this.getStandardOutputLogLevel().get();
159159
var stdErrLevel = this.getStandardErrorLogLevel().get();
160160
return this.getExecOperations().javaexec(spec -> {
161+
spec.setIgnoreExitValue(true);
162+
161163
spec.setClasspath(this.getClasspath());
162164
spec.getMainClass().set(this.getMainClass());
163165
spec.setExecutable(this.getJavaLauncher().get().getExecutablePath().getAsFile().getAbsolutePath());

0 commit comments

Comments
 (0)