Skip to content

Commit b2bbf94

Browse files
committed
Use doFirst to delay setting testOnlyPath env var
1 parent e9093d3 commit b2bbf94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchTestBasePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public void execute(Task t) {
182182
FileCollection mainRuntime = mainSourceSet.getRuntimeClasspath();
183183
FileCollection testRuntime = testSourceSet.getRuntimeClasspath();
184184
FileCollection testOnlyFiles = testRuntime.minus(mainRuntime);
185-
test.environment("es.entitlement.testOnlyPath", project.provider(testOnlyFiles::getAsPath));
185+
test.doFirst(task -> test.environment("es.entitlement.testOnlyPath", testOnlyFiles.getAsPath()));
186186
}
187187

188188
test.systemProperties(getProviderFactory().systemPropertiesPrefixedBy("tests.").get());

0 commit comments

Comments
 (0)