diff --git a/noita-proxy/Cargo.lock b/noita-proxy/Cargo.lock index 0651ac27..13cb176c 100644 --- a/noita-proxy/Cargo.lock +++ b/noita-proxy/Cargo.lock @@ -1993,7 +1993,7 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "noita-proxy" -version = "0.21.2" +version = "0.21.3" dependencies = [ "argh", "bincode", diff --git a/noita-proxy/Cargo.toml b/noita-proxy/Cargo.toml index 7c46381b..57144dfa 100644 --- a/noita-proxy/Cargo.toml +++ b/noita-proxy/Cargo.toml @@ -5,7 +5,7 @@ resolver = "2" [package] name = "noita-proxy" description = "Noita Entangled Worlds companion app." -version = "0.21.2" +version = "0.21.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/noita-proxy/src/bookkeeping/mod_manager.rs b/noita-proxy/src/bookkeeping/mod_manager.rs index 256a37a7..30099676 100644 --- a/noita-proxy/src/bookkeeping/mod_manager.rs +++ b/noita-proxy/src/bookkeeping/mod_manager.rs @@ -328,10 +328,24 @@ fn mod_downloader_for( .timeout(None) .build() .wrap_err("Failed to build client")?; - get_release_by_tag(&client, tag) - .and_then(|release| release.get_release_assets(&client).wrap_err("")) - .and_then(|asset_list| asset_list.find_by_name("quant.ew.zip").cloned()) - .and_then(|asset| asset.download(&client, &download_path)) + get_release_by_tag(&client, tag.clone()) + .wrap_err_with(|| format!("while getting release for tag {:?}", tag)) + .and_then(|release| { + release + .get_release_assets(&client) + .wrap_err("while getting release assets") + }) + .and_then(|asset_list| { + asset_list + .find_by_name("quant.ew.zip") + .cloned() + .wrap_err("while finding asset by name") + }) + .and_then(|asset| { + asset + .download(&client, &download_path) + .wrap_err("while creating a downloader") + }) .wrap_err("Failed to download mod") } diff --git a/noita-proxy/src/bookkeeping/releases.rs b/noita-proxy/src/bookkeeping/releases.rs index 4a6fe480..546e6288 100644 --- a/noita-proxy/src/bookkeeping/releases.rs +++ b/noita-proxy/src/bookkeeping/releases.rs @@ -135,7 +135,7 @@ impl AssetList { } } -#[derive(Debug, Deserialize)] +#[derive(Debug, Deserialize, Clone)] pub struct Tag(String); #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)]