aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src-tauri/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index aa3802bd..8ec7e4b1 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -217,7 +217,7 @@ async fn do_install(
log::info!("Download path: {download_path}");
let last_emit = RefCell::new(Instant::now()); // Keep track of the last time a signal was emitted
- let nfile = thermite::core::manage::download_file_with_progress(
+ let nfile = match thermite::core::manage::download_file_with_progress(
&nmod.url,
download_path,
|delta, current, total| {
@@ -240,8 +240,10 @@ async fn do_install(
}
}
},
- )
- .unwrap();
+ ) {
+ Ok(res) => res,
+ Err(err) => return Err(anyhow!("Failed downloading Northstar {}", err)),
+ };
window
.emit(