MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / bazelJava

Function bazelJava

javascript/selenium-webdriver/testing/index.js:607–617  ·  view source on GitHub ↗

* Bazel's hermetic java, from `SE_BAZEL_JAVA_LOCATION` (a file holding the `$(JAVA)` path). * @return {(string|undefined)} the java executable, or undefined to use the server's default.

()

Source from the content-addressed store, hash-verified

605 * @return {(string|undefined)} the java executable, or undefined to use the server's default.
606 */
607function bazelJava() {
608 const javaLocation = process.env['SE_BAZEL_JAVA_LOCATION']
609 if (!javaLocation) {
610 return undefined
611 }
612 // $(JAVA) is an exec path (external/<repo>/...); without the prefix it is a runfiles path.
613 const execPath = fs.readFileSync(locate(javaLocation), { encoding: 'utf8' }).trim()
614 const java = locate(execPath.replace(/^external\//, ''))
615 // Resolve the JDK symlink to its real path to dodge a Windows JVM bug mapping lib\modules.
616 return process.platform === 'win32' ? fs.realpathSync(java) : java
617}
618
619/** Browser name -> [driver env var, browser env var, vendor options key], for pinned browsers. */
620const PINNED_BROWSERS = {

Callers 1

suiteFunction · 0.85

Calls 1

locateFunction · 0.85

Tested by

no test coverage detected