Skip to content

Commit

Permalink
fix(self update): πŸ› show error message when failing to update (#284)
Browse files Browse the repository at this point in the history
This was only showing that the update failed, this should show the error
message.
  • Loading branch information
xaf authored Dec 14, 2023
1 parent a3bca18 commit ed2f29d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/internal/self_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,13 @@ impl OmniRelease {
self.download(progress_handler.as_ref())
};

if updated.is_err() {
progress_handler.error_with_message("Failed to update".to_string());
return;
}
let updated = updated.unwrap();
let updated = match updated {
Ok(updated) => updated,
Err(err) => {
progress_handler.error_with_message(format!("failed to update: {}", err));
return;
}
};

if updated {
progress_handler
Expand Down

0 comments on commit ed2f29d

Please sign in to comment.