Skip to content

Commit c8b1f17

Browse files
committed
Defer testOnlyFiles via Object.toString rather than Provider<String>.
The latter caused the env var value to be wrapped in "fixed(...)" for some reason.
1 parent e9093d3 commit c8b1f17

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,12 @@ 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.environment("es.entitlement.testOnlyPath", new Object() {
186+
@Override
187+
public String toString() {
188+
return testOnlyFiles.getAsPath();
189+
}
190+
});
186191
}
187192

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

0 commit comments

Comments
 (0)