Skip to content

Commit

Permalink
restart in place
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmizz committed Feb 28, 2025
1 parent b9d88d3 commit 84fd5d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/components/updater/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ pub fn Updater() -> Element {
log::info!("installing");
if let Err(_err) = update.install(binary.as_ref()) {
log::error!("error installing binary");
} else {
log::info!("install complete");
match std::process::Command::new("open")
.arg("-n")
.arg(update.extract_path)
.spawn()
{
Ok(child) => {
log::info!("new process started: {:?}", child);
std::process::exit(0);
}
Err(err) => {
log::error!("{:?}", err);
}
}
}
});
},
Expand Down

0 comments on commit 84fd5d9

Please sign in to comment.