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
Changes
Creates separate temporary directories for backup and extraction to better manage the update process
Adds proper directory creation for extracted files to prevent path-related issues
Implements fallback to AppleScript with admin privileges when standard file operations fail due to permissions
Improves error handling and cleanup in case of failures during the update process
Maintains atomic update operations to prevent partial updates
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:
Properly handling permission-denied scenarios
Using admin privileges when necessary
Ensuring clean rollback in case of failures
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
Tested app updates on an admin account and a use account
Verified successful updates both with and without admin privileges
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
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:
Testing