Forráskód Böngészése

fix(updater): Use escaped installer path when starting the updater msi (#8234)

* fix(updater): Use escaped installer path when starting the updater msi

Continuation of https://github.com/tauri-apps/tauri/pull/7956

* fix build
Amr Bashir 1 éve
szülő
commit
4b6a602a89

+ 5 - 0
.changes/updater-msi-escaped-path.md

@@ -0,0 +1,5 @@
+---
+'tauri': 'patch:bug'
+---
+
+Escape path of the updater msi to avoid crashing on installers with spaces.

+ 2 - 2
core/tauri/src/updater/core.rs

@@ -844,7 +844,7 @@ fn copy_files_and_run<R: Read + Seek>(
           "-ArgumentList",
         ])
         .arg("/i,")
-        .arg(msi_path_arg)
+        .arg(&msi_path_arg)
         .arg(format!(", {}, /promptrestart;", msiexec_args.join(", ")))
         .arg("Start-Process")
         .arg(current_exe_arg)
@@ -858,7 +858,7 @@ fn copy_files_and_run<R: Read + Seek>(
         );
         let _ = Command::new(msiexec_path)
           .arg("/i")
-          .arg(found_path)
+          .arg(msi_path_arg)
           .args(msiexec_args)
           .arg("/promptrestart")
           .spawn();