diff --git a/Casks/orca.rb b/Casks/orca.rb index 39906751a79..51787cde42f 100644 --- a/Casks/orca.rb +++ b/Casks/orca.rb @@ -15,7 +15,7 @@ cask "orca" do strategy :github_latest end - # Let the in-app updater own updates; Homebrew skips auto_updates unless --greedy. + # Let the in-app updater own updates between brew upgrades. auto_updates true conflicts_with cask: "orca@rc" depends_on macos: :ventura @@ -25,6 +25,15 @@ cask "orca" do # Expose the symlink-resolving bundled CLI on PATH so headless hosts can use orca serve without the in-app installer. binary "#{appdir}/Orca.app/Contents/Resources/bin/orca" + # depends_on can't say 13.4, and Homebrew upgrades auto_updates casks past the in-app updater's macOS gate. + preflight_steps do + run "/bin/sh", args: [ + "-c", + 'case "$(/usr/bin/sw_vers -productVersion)" in 13|13.[0-3]|13.[0-3].*) ' \ + 'echo "Orca needs macOS 13.4 or later. Update macOS to upgrade Orca." >&2; exit 1;; esac', + ] + end + # Zap app-created ~/.orca and Electron userData for a clean uninstall. zap trash: [ "~/.orca", diff --git a/Casks/orca@rc.rb b/Casks/orca@rc.rb index 42ccb7dd19f..61b1aeb268a 100644 --- a/Casks/orca@rc.rb +++ b/Casks/orca@rc.rb @@ -36,6 +36,15 @@ cask "orca@rc" do # Expose the symlink-resolving bundled CLI on PATH so headless hosts can use orca serve without the in-app installer. binary "#{appdir}/Orca.app/Contents/Resources/bin/orca" + # depends_on can't say 13.4, and Homebrew upgrades auto_updates casks past the in-app updater's macOS gate. + preflight_steps do + run "/bin/sh", args: [ + "-c", + 'case "$(/usr/bin/sw_vers -productVersion)" in 13|13.[0-3]|13.[0-3].*) ' \ + 'echo "Orca needs macOS 13.4 or later. Update macOS to upgrade Orca." >&2; exit 1;; esac', + ] + end + # Zap app-created ~/.orca and Electron userData for a clean uninstall. zap trash: [ "~/.orca",