Skip to content

Commit 1cb8311

Browse files
authored
feat(updater): backport changes from tauri v1 (#405)
1 parent db7f4f9 commit 1cb8311

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.changes/updater-nsis.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"updater": patch
3+
---
4+
5+
Implement passive mode on NSIS and automatically restart after NSIS update.

plugins/updater/src/updater/core.rs

+5-9
Original file line numberDiff line numberDiff line change
@@ -736,15 +736,11 @@ fn copy_files_and_run<R: Read + Seek>(
736736
// If it's an `exe` we expect an installer not a runtime.
737737
if found_path.extension() == Some(OsStr::new("exe")) {
738738
// Run the EXE
739-
let mut installer = Command::new(found_path);
740-
if tauri::utils::config::WindowsUpdateInstallMode::Quiet
741-
== config.tauri.bundle.updater.windows.install_mode
742-
{
743-
installer.arg("/S");
744-
}
745-
installer.args(&updater_config.installer_args);
746-
747-
installer.spawn().expect("installer failed to start");
739+
Command::new(found_path)
740+
.args(config.tauri.bundle.updater.windows.install_mode.nsis_args())
741+
.args(&updater_config.installer_args)
742+
.spawn()
743+
.expect("installer failed to start");
748744

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

0 commit comments

Comments
 (0)