mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
handle some networking errors
assume we are up to date if we can't fetch latest version
This commit is contained in:
@@ -9,7 +9,13 @@ use std::fs;
|
||||
use std::path::Path;
|
||||
|
||||
pub async fn remote_revision() -> u16 {
|
||||
misc::rev_to_int(&github::latest_tag(GH_IW4X_OWNER, GH_IW4X_REPO).await)
|
||||
match github::latest_tag(GH_IW4X_OWNER, GH_IW4X_OWNER).await {
|
||||
Ok(tag) => misc::rev_to_int(&tag),
|
||||
Err(_) => {
|
||||
crate::println_error!("Failed to get latest version for {GH_IW4X_OWNER}/{GH_IW4X_OWNER}, assuming we are up to date.");
|
||||
0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn update(dir: &Path, cache: &mut structs::Cache) {
|
||||
|
||||
Reference in New Issue
Block a user