Skip to content

Commit

Permalink
feat(updater): backport changes from tauri v1 (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog authored Jun 18, 2023
1 parent db7f4f9 commit 1cb8311
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .changes/updater-nsis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"updater": patch
---

Implement passive mode on NSIS and automatically restart after NSIS update.
14 changes: 5 additions & 9 deletions plugins/updater/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -736,15 +736,11 @@ fn copy_files_and_run<R: Read + Seek>(
// If it's an `exe` we expect an installer not a runtime.
if found_path.extension() == Some(OsStr::new("exe")) {
// Run the EXE
let mut installer = Command::new(found_path);
if tauri::utils::config::WindowsUpdateInstallMode::Quiet
== config.tauri.bundle.updater.windows.install_mode
{
installer.arg("/S");
}
installer.args(&updater_config.installer_args);

installer.spawn().expect("installer failed to start");
Command::new(found_path)
.args(config.tauri.bundle.updater.windows.install_mode.nsis_args())
.args(&updater_config.installer_args)
.spawn()
.expect("installer failed to start");

exit(0);
} else if found_path.extension() == Some(OsStr::new("msi")) {
Expand Down

0 comments on commit 1cb8311

Please sign in to comment.