diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs
index 964b07d87518d990a39d983d03a8cf90358cc5de..a464ced821b263a1e48d19fe90f85519ae98b408 100644
--- a/crates/auto_update/src/auto_update.rs
+++ b/crates/auto_update/src/auto_update.rs
@@ -629,9 +629,13 @@ impl AutoUpdater {
cx.notify();
});
- let installer_dir = InstallerDir::new().await?;
+ let installer_dir = InstallerDir::new()
+ .await
+ .context("Failed to create installer dir")?;
let target_path = Self::target_path(&installer_dir).await?;
- download_release(&target_path, fetched_release_data, client).await?;
+ download_release(&target_path, fetched_release_data, client)
+ .await
+ .with_context(|| format!("Failed to download update to {}", target_path.display()))?;
this.update(cx, |this, cx| {
this.status = AutoUpdateStatus::Installing {
@@ -640,7 +644,9 @@ impl AutoUpdater {
cx.notify();
});
- let new_binary_path = Self::install_release(installer_dir, target_path, cx).await?;
+ let new_binary_path = Self::install_release(installer_dir, &target_path, cx)
+ .await
+ .with_context(|| format!("Failed to install update at: {}", target_path.display()))?;
if let Some(new_binary_path) = new_binary_path {
cx.update(|cx| cx.set_restart_path(new_binary_path));
}
@@ -730,7 +736,7 @@ impl AutoUpdater {
async fn install_release(
installer_dir: InstallerDir,
- target_path: PathBuf,
+ target_path: &Path,
cx: &AsyncApp,
) -> Result