Skip to content

Commit 144e8a0

Browse files
committed
Use an env var for the classpath of jar hell task (#48240)
The classpath for some project could outgrow the max allowed command line on Windows. Using an env var is not fault proof, but give more breathing room
1 parent 3233b59 commit 144e8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

buildSrc/src/main/java/org/elasticsearch/gradle/precommit/JarHellTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public JarHellTask() {
4242
@TaskAction
4343
public void runJarHellCheck() {
4444
LoggedExec.javaexec(getProject(), spec -> {
45-
spec.classpath(getClasspath());
45+
spec.environment("CLASSPATH", getClasspath().getAsPath());
4646
spec.setMain("org.elasticsearch.bootstrap.JarHell");
4747
});
4848
}

0 commit comments

Comments
 (0)