File tree 1 file changed +12
-1
lines changed
javascript/node/selenium-webdriver/testing
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 35
35
const fs = require ( 'node:fs' )
36
36
const path = require ( 'node:path' )
37
37
const { isatty } = require ( 'node:tty' )
38
- const { runfiles } = require ( '@bazel/runfiles' )
39
38
const chrome = require ( '../chrome' )
40
39
const edge = require ( '../edge' )
41
40
const firefox = require ( '../firefox' )
@@ -46,6 +45,14 @@ const { Browser } = require('../lib/capabilities')
46
45
const { Builder } = require ( '../index' )
47
46
const { getBinaryPaths } = require ( '../common/driverFinder' )
48
47
48
+ let runfiles
49
+ try {
50
+ // Attempt to require @bazel /runfiles
51
+ runfiles = require ( '@bazel/runfiles' ) . runfiles
52
+ } catch {
53
+ // Fall through
54
+ }
55
+
49
56
/**
50
57
* Describes a browser targeted by a {@linkplain suite test suite}.
51
58
* @record
@@ -544,6 +551,10 @@ function locate(fileLike) {
544
551
return fileLike
545
552
}
546
553
554
+ if ( ! runfiles ) {
555
+ throw new Error ( 'Unable to find ' + fileLike )
556
+ }
557
+
547
558
try {
548
559
return runfiles . resolve ( fileLike )
549
560
} catch {
You can’t perform that action at this time.
0 commit comments