Skip to content

Commit 204ff83

Browse files
authored
Use an env var for the classpath of jar hell task (elastic#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 4e2ee64 commit 204ff83

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

+1-1
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)