mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-09-11 07:55:34 +03:00
fix(updater): escape MSI path (#4737)
This commit is contained in:
parent
635f23b88a
commit
9af43134e1
5
.changes/fix-windows-updater.md
Normal file
5
.changes/fix-windows-updater.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"tauri": patch
|
||||
---
|
||||
|
||||
Escape the MSI file path when running msiexec via powershell.
|
@ -789,6 +789,12 @@ fn copy_files_and_run<R: Read + Seek>(
|
||||
current_exe_arg.push("\"");
|
||||
current_exe_arg.push(current_exe()?);
|
||||
current_exe_arg.push("\"");
|
||||
|
||||
let mut msi_path_arg = std::ffi::OsString::new();
|
||||
msi_path_arg.push("\"\"\"");
|
||||
msi_path_arg.push(&found_path);
|
||||
msi_path_arg.push("\"\"\"");
|
||||
|
||||
// run the installer and relaunch the application
|
||||
let powershell_install_res = Command::new("powershell.exe")
|
||||
.args(["-NoProfile", "-windowstyle", "hidden"])
|
||||
@ -800,7 +806,7 @@ fn copy_files_and_run<R: Read + Seek>(
|
||||
"-ArgumentList",
|
||||
])
|
||||
.arg("/i,")
|
||||
.arg(&found_path)
|
||||
.arg(msi_path_arg)
|
||||
.arg(format!(", {}, /promptrestart;", msiexec_args.join(", ")))
|
||||
.arg("Start-Process")
|
||||
.arg(current_exe_arg)
|
||||
|
Loading…
Reference in New Issue
Block a user