@@ -249,6 +249,7 @@ fn main() {
249249                & driver_path, 
250250                & selenium_manager. get_browser_path_or_latest_from_cache ( ) , 
251251                selenium_manager. get_receiver ( ) , 
252+                 selenium_manager. is_offline ( ) , 
252253            ) ; 
253254            flush_and_exit ( OK ,  log,  None ) ; 
254255        } ) 
@@ -271,12 +272,20 @@ fn main() {
271272                        & best_driver_from_cache, 
272273                        & selenium_manager. get_browser_path_or_latest_from_cache ( ) , 
273274                        selenium_manager. get_receiver ( ) , 
275+                         selenium_manager. is_offline ( ) , 
274276                    ) ; 
275277                    flush_and_exit ( OK ,  log,  Some ( err) ) ; 
276278                } 
277279            } 
278280            if  selenium_manager. is_offline ( )  { 
279281                log. warn ( & err) ; 
282+                 log_driver_and_browser_path ( 
283+                     log, 
284+                     & Path :: new ( "" ) , 
285+                     & selenium_manager. get_browser_path_or_latest_from_cache ( ) , 
286+                     selenium_manager. get_receiver ( ) , 
287+                     selenium_manager. is_offline ( ) , 
288+                 ) ; 
280289                flush_and_exit ( OK ,  log,  Some ( err) ) ; 
281290            }  else  { 
282291                let  error_msg = log
@@ -294,13 +303,15 @@ fn log_driver_and_browser_path(
294303    driver_path :  & Path , 
295304    browser_path :  & str , 
296305    receiver :  & Receiver < String > , 
306+     is_offline :  bool , 
297307)  { 
298308    if  let  Ok ( err)  = receiver. try_recv ( )  { 
299309        log. warn ( err) ; 
300310    } 
301-     if  driver_path. exists ( )  { 
311+ 
312+     if  !driver_path. as_os_str ( ) . is_empty ( )  && driver_path. exists ( )  { 
302313        log. info ( format ! ( "{}{}" ,  DRIVER_PATH ,  driver_path. display( ) ) ) ; 
303-     }  else  { 
314+     }  else  if  !is_offline  { 
304315        log. error ( format ! ( "Driver unavailable: {}" ,  driver_path. display( ) ) ) ; 
305316        flush_and_exit ( UNAVAILABLE ,  log,  None ) ; 
306317    } 
0 commit comments