File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed 
javascript/node/selenium-webdriver/testing Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 3535const  fs  =  require ( 'node:fs' ) 
3636const  path  =  require ( 'node:path' ) 
3737const  {  isatty }  =  require ( 'node:tty' ) 
38- const  {  runfiles }  =  require ( '@bazel/runfiles' ) 
3938const  chrome  =  require ( '../chrome' ) 
4039const  edge  =  require ( '../edge' ) 
4140const  firefox  =  require ( '../firefox' ) 
@@ -46,6 +45,14 @@ const { Browser } = require('../lib/capabilities')
4645const  {  Builder }  =  require ( '../index' ) 
4746const  {  getBinaryPaths }  =  require ( '../common/driverFinder' ) 
4847
48+ let  runfiles 
49+ try  { 
50+   // Attempt to require @bazel /runfiles 
51+   runfiles  =  require ( '@bazel/runfiles' ) . runfiles 
52+ }  catch  { 
53+   // Fall through 
54+ } 
55+ 
4956/** 
5057 * Describes a browser targeted by a {@linkplain  suite test suite}. 
5158 * @record  
@@ -544,6 +551,10 @@ function locate(fileLike) {
544551    return  fileLike 
545552  } 
546553
554+   if  ( ! runfiles )  { 
555+     throw  new  Error ( 'Unable to find '  +  fileLike ) 
556+   } 
557+ 
547558  try  { 
548559    return  runfiles . resolve ( fileLike ) 
549560  }  catch  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments