Skip to content

Commit 01fad77

Browse files
committed
Fix plugin build test on Windows (#33078)
Fix plugin build test on Windows
1 parent 01a3b66 commit 01fad77

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

buildSrc/src/test/java/org/elasticsearch/gradle/BuildExamplePluginsIT.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,12 @@ private String getLocalTestRepoPath() {
158158
Objects.requireNonNull(property, "test.local-test-repo-path not passed to tests");
159159
File file = new File(property);
160160
assertTrue("Expected " + property + " to exist, but it did not!", file.exists());
161-
return file.getAbsolutePath();
161+
if (File.separator.equals("\\")) {
162+
// Use / on Windows too, the build script is not happy with \
163+
return file.getAbsolutePath().replace(File.separator, "/");
164+
} else {
165+
return file.getAbsolutePath();
166+
}
162167
}
163168

164169
}

0 commit comments

Comments
 (0)