From 04252603663979ecb16a9db1853bf528c9320f67 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 15 Nov 2023 17:26:43 +0200 Subject: [PATCH 1/2] fix(updater): Use escaped installer path when starting the updater msi Continuation of https://github.com/tauri-apps/tauri/pull/7956 --- .changes/updater-msi-escaped-path.md | 5 +++++ core/tauri/src/updater/core.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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..f77df3c5a2b3 100644 --- a/core/tauri/src/updater/core.rs +++ b/core/tauri/src/updater/core.rs @@ -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(); From 4dbddfa970b3b6ac4f3e7dbc92069ffb4d8b98ea Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 15 Nov 2023 18:00:59 +0200 Subject: [PATCH 2/2] fix build --- core/tauri/src/updater/core.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs index f77df3c5a2b3..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)