(&self)
| 1095 | } |
| 1096 | |
| 1097 | fn get_browser_path_or_latest_from_cache(&self) -> String { |
| 1098 | let mut browser_path = self.get_browser_path().to_string(); |
| 1099 | if browser_path.is_empty() { |
| 1100 | let best_browser_from_cache = &self |
| 1101 | .find_best_browser_from_cache() |
| 1102 | .unwrap_or_default() |
| 1103 | .unwrap_or_default(); |
| 1104 | if best_browser_from_cache.exists() { |
| 1105 | self.get_logger().debug_or_warn( |
| 1106 | format!( |
| 1107 | "There was an error managing {}; using browser found in the cache", |
| 1108 | self.get_browser_name() |
| 1109 | ), |
| 1110 | self.is_offline(), |
| 1111 | ); |
| 1112 | browser_path = path_to_string(best_browser_from_cache); |
| 1113 | } |
| 1114 | } |
| 1115 | browser_path |
| 1116 | } |
| 1117 | |
| 1118 | fn find_best_browser_from_cache(&self) -> Result<Option<PathBuf>, Error> { |
| 1119 | let cache_path = self.get_cache_path()?.unwrap_or_default(); |
no test coverage detected