Windows relaunches after an update (#1748)

After the MSI installer finishes, wait for msiexec and start the installed exe; relaunch is detached on Windows.
This commit is contained in:
bherbruck authored and GitHub committed 2026-10-16 10:40:58 -04:00
1 parent a16226288f
commit 201e055259
4 files changed
+56 -6

No files matched your search

+7 -2
View File
@@ -697,8 +697,13 @@ fn poll_install(app: &mut SolveApp) {
app.updater.job = None;
match &result {
Ok(install::Outcome::Installer(program, args)) => {
// The installer replaces this program: start it once SolidCraft has closed.
app.updater.launch = Some((program.clone(), args.clone()));
// The installer replaces this program: start it once SolidCraft has closed. On
// Windows the installer is followed by the new version (see install::relaunch_after).
app.updater.launch = Some(match std::env::current_exe() {
#[cfg(windows)]
Ok(exe) => install::relaunch_after(program, args, &exe),
_ => (program.clone(), args.clone()),
});
crate::documents::request_quit(app);
}
Ok(install::Outcome::Opened(dmg)) => {