Skip to content

Commit 0eb0ca7

Browse files
committed
Fix transformer being run with empty config.
Now does nothing instead of erroring.
1 parent 6a1e7a9 commit 0eb0ca7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

at-gradle/src/main/java/net/minecraftforge/accesstransformers/gradle/ArtifactAccessTransformer.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,12 @@ private void exec(TransformOutputs outputs) throws Exception {
205205

206206
// inputs
207207
var inJar = this.getInputArtifact().get().getAsFile();
208-
var atFile = parameters.getConfig().map(RegularFile::getAsFile).get();
208+
var atFile = parameters.getConfig().getAsFile().getOrNull();
209+
if (atFile == null) {
210+
// No config so just return the input file
211+
outputs.file(inJar);
212+
return;
213+
}
209214

210215
// outputs
211216
var outJarName = inJar.getName().replace(".jar", "-at.jar");

0 commit comments

Comments
 (0)