Skip to content

Commit

Permalink
fix(updater): Use escaped installer path when starting the updater msi (
Browse files Browse the repository at this point in the history
#8234)

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

Continuation of #7956

* fix build
  • Loading branch information
amrbashir committed Nov 15, 2023
1 parent 92bc7d0 commit 4b6a602
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changes/updater-msi-escaped-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'tauri': 'patch:bug'
---

Escape path of the updater msi to avoid crashing on installers with spaces.
4 changes: 2 additions & 2 deletions core/tauri/src/updater/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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();
Expand Down

0 comments on commit 4b6a602

Please sign in to comment.