From 4b6a602a89b36f24d34d6ccd8e3c9b7ce202c9eb Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 16 Nov 2023 01:26:03 +0200 Subject: [PATCH] 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 --- .changes/updater-msi-escaped-path.md | 5 +++++ core/tauri/src/updater/core.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changes/updater-msi-escaped-path.md diff --git a/.changes/updater-msi-escaped-path.md b/.changes/updater-msi-escaped-path.md new file mode 100644 index 000000000000..1235827d15e1 --- /dev/null +++ b/.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. diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index 4d488d3e756f..838ded932523 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -844,7 +844,7 @@ fn copy_files_and_run( "-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( ); let _ = Command::new(msiexec_path) .arg("/i") - .arg(found_path) + .arg(msi_path_arg) .args(msiexec_args) .arg("/promptrestart") .spawn();