(&self)
| 1073 | } |
| 1074 | |
| 1075 | fn get_browser_path_or_latest_from_cache(&self) -> String { |
| 1076 | let mut browser_path = self.get_browser_path().to_string(); |
| 1077 | if browser_path.is_empty() { |
| 1078 | let best_browser_from_cache = &self |
| 1079 | .find_best_browser_from_cache() |
| 1080 | .unwrap_or_default() |
| 1081 | .unwrap_or_default(); |
| 1082 | if best_browser_from_cache.exists() { |
| 1083 | self.get_logger().debug_or_warn( |
| 1084 | format!( |
| 1085 | "There was an error managing {}; using browser found in the cache", |
| 1086 | self.get_browser_name() |
| 1087 | ), |
| 1088 | self.is_offline(), |
| 1089 | ); |
| 1090 | browser_path = path_to_string(best_browser_from_cache); |
| 1091 | } |
| 1092 | } |
| 1093 | browser_path |
| 1094 | } |
| 1095 | |
| 1096 | fn find_best_browser_from_cache(&self) -> Result<Option<PathBuf>, Error> { |
| 1097 | let cache_path = self.get_cache_path()?.unwrap_or_default(); |
no test coverage detected