()
| 73 | } |
| 74 | |
| 75 | fn get_cache_path() -> Option<PathBuf> { |
| 76 | match std::env::var_os("HOME") { |
| 77 | Some(home) => { |
| 78 | let mut path = PathBuf::from(home); |
| 79 | path.push(".cache"); |
| 80 | path.push("axs"); |
| 81 | path.push(CACHE_FILE); |
| 82 | Some(path) |
| 83 | } |
| 84 | None => match std::env::var_os("TMPDIR").or_else(|| std::env::var_os("TMP")) { |
| 85 | Some(tmp) => { |
| 86 | let mut path = PathBuf::from(tmp); |
| 87 | path.push("axs"); |
| 88 | path.push(CACHE_FILE); |
| 89 | Some(path) |
| 90 | } |
| 91 | None => None, |
| 92 | }, |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | pub async fn check_update(&self) -> Result<Option<String>, Box<dyn std::error::Error>> { |
| 97 | // Check cache first |
nothing calls this directly
no outgoing calls
no test coverage detected