(&self)
| 1106 | } |
| 1107 | |
| 1108 | fn get_browser_path_or_latest_from_cache(&self) -> String { |
| 1109 | let mut browser_path = self.get_browser_path().to_string(); |
| 1110 | if browser_path.is_empty() { |
| 1111 | let best_browser_from_cache = &self |
| 1112 | .find_best_browser_from_cache() |
| 1113 | .unwrap_or_default() |
| 1114 | .unwrap_or_default(); |
| 1115 | if best_browser_from_cache.exists() { |
| 1116 | self.get_logger().debug_or_warn( |
| 1117 | format!( |
| 1118 | "There was an error managing {}; using browser found in the cache", |
| 1119 | self.get_browser_name() |
| 1120 | ), |
| 1121 | self.is_offline(), |
| 1122 | ); |
| 1123 | browser_path = path_to_string(best_browser_from_cache); |
| 1124 | } |
| 1125 | } |
| 1126 | browser_path |
| 1127 | } |
| 1128 | |
| 1129 | fn find_best_browser_from_cache(&self) -> Result<Option<PathBuf>, Error> { |
| 1130 | let cache_path = self.get_cache_path()?.unwrap_or_default(); |
no test coverage detected