[java] We can't use bazel runfiles root as project root on windows.
package org.openqa.selenium.build;
+import static org.openqa.selenium.Platform.WINDOWS;
+
import com.google.common.base.Preconditions;
+import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriverException;
import java.io.FileNotFoundException;
@@ -59,10 +62,13 @@ public static Path locate(String... paths) {
}
public static Path findProjectRoot() {
- Path dir = findRunfilesRoot();
+ Path dir;
+ if (!Platform.getCurrent().is(WINDOWS)) {
+ dir = findRunfilesRoot();
if (dir != null) {
return dir.resolve("selenium").normalize();
}
+ }
// Find the rakefile first
dir = Paths.get(".").toAbsolutePath();
