Skip to content

Commit 399ce4e

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 46eb30b commit 399ce4e

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
@@ -41,7 +41,7 @@ public JarHellTask() {
4141
@TaskAction
4242
public void runJarHellCheck() {
4343
LoggedExec.javaexec(getProject(), spec -> {
44-
spec.classpath(getClasspath());
44+
spec.environment("CLASSPATH", getClasspath().getAsPath());
4545
spec.executable(getJavaHome() + "/bin/java");
4646
spec.setMain("org.elasticsearch.bootstrap.JarHell");
4747
});

0 commit comments

Comments
 (0)