tauri-apps / plugins-workspace

All of the official Tauri plugins in one place!
https://tauri.app
Apache License 2.0
981 stars 275 forks source link

fix(macOS): Tauri V2 Update Permission Denied Error #2067

Open jLynx opened 1 week ago

jLynx commented 1 week ago

Description

Improves the macOS app update process by adding proper handling for permission-denied scenarios and implementing a more robust extraction mechanism. This is the Tauri V2 version of my previous PR https://github.com/tauri-apps/tauri/pull/10427

image

Changes

Why

The current implementation could fail on macOS when the app lacks sufficient permissions to modify its own directory, which is common in certain installation locations. This update provides a more reliable solution by:

  1. Properly handling permission-denied scenarios
  2. Using admin privileges when necessary
  3. Ensuring clean rollback in case of failures
  4. Addressed the problem of Tauri updater failing for standard (non-admin) users on macOS with a "Permission Denied" error as stated in this issue https://github.com/tauri-apps/tauri/issues/8104.

Testing