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

Function binaryPath

javascript/selenium-manager/test/index_test.js:58–74  ·  view source on GitHub ↗
(fx, platform, arch, env = {})

Source from the content-addressed store, hash-verified

56}
57
58function binaryPath(fx, platform, arch, env = {}) {
59 // Inherit the environment: under Bazel, process.execPath is a launcher that
60 // needs the JS_BINARY__* variables to find the real node.
61 const childEnv = { ...process.env, NODE_PATH: fx.modules, FAKE_PLATFORM: platform, FAKE_ARCH: arch, ...env }
62 if (!('SE_MANAGER_PATH' in env)) {
63 delete childEnv.SE_MANAGER_PATH
64 }
65 const result = spawnSync(
66 process.execPath,
67 ['-r', fx.shim, '-e', `process.stdout.write(require(${JSON.stringify(INDEX)}).binaryPath())`],
68 {
69 encoding: 'utf8',
70 env: childEnv,
71 },
72 )
73 return { path: result.stdout, error: result.stderr, status: result.status }
74}
75
76const CASES = [
77 ['linux', 'x64', '@selenium/manager-linux-x64', 'selenium-manager'],

Callers 2

index_test.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected