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();