macos: make auto-update optional (#4436)

When unset, we use Sparkle's default behavior, which is based on the
user's preference stored in the standard user defaults.

The rest of the previous behavior is preserved:
- When SUEnableAutomaticChecks is explicitly false, auto-updates are
disabled.
- When 'auto-update' is set, use its value to set Sparkle's auto-update
behavior.

Fixes #4433
This commit is contained in:
Mitchell Hashimoto
2025-01-02 13:38:15 -08:00
committed by GitHub
3 changed files with 16 additions and 15 deletions

View File

@@ -1993,10 +1993,11 @@ term: []const u8 = "xterm-ghostty",
/// * `download` - Check for updates, automatically download the update,
/// notify the user, but do not automatically install the update.
///
/// The default value is `check`.
/// If unset, we defer to Sparkle's default behavior, which respects the
/// preference stored in the standard user defaults (`defaults(1)`).
///
/// Changing this value at runtime works after a small delay.
@"auto-update": AutoUpdate = .check,
@"auto-update": ?AutoUpdate = null,
/// The release channel to use for auto-updates.
///