From 98dd8610ae6ea7f96c385b6efd23b784e48dbd93 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Mon, 29 May 2023 08:59:35 +0100 Subject: [PATCH] Tweak code style and documentation wording --- Library/Homebrew/cask/quarantine.rb | 3 ++- docs/FAQ.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cask/quarantine.rb b/Library/Homebrew/cask/quarantine.rb index 194c794990..119acba798 100644 --- a/Library/Homebrew/cask/quarantine.rb +++ b/Library/Homebrew/cask/quarantine.rb @@ -198,7 +198,7 @@ module Cask # To get macOS to prompt the user for permissions, we need to actually attempt to # modify a file in the app. - test_file = app / ".homebrew-write-test" + test_file = app/".homebrew-write-test" # We can't use app.writable? here because that conflates several access checks, # including both file ownership and whether system permissions are granted. @@ -249,6 +249,7 @@ module Cask This may result in some configurations (like notification settings or location in the Dock/Launchpad) being lost. To fix this, go to Settings > Security and Privacy > App Management and turn on the switch for your terminal. EOF + false end end diff --git a/docs/FAQ.md b/docs/FAQ.md index 12f6eea5b0..143b4fecb7 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -221,8 +221,8 @@ Or use the `--greedy` flag: Refer to the `upgrade` section of the [`brew` manual page](Manpage.md) for more details. -## Why do my apps lose their Dock position / Launchpad position / permission settings when I run `brew upgrade`? +## Why do my cask apps lose their Dock position / Launchpad position / permission settings when I run `brew upgrade`? -Homebrew has two possible strategies to update apps: uninstalling the old version and reinstalling the new one, or replacing the contents of the app with the new contents. With the uninstall/reinstall strategy, [macOS thinks the app is being deleted without any intent to reinstall it](https://github.com/Homebrew/brew/pull/15138), and so it removes some internal metadata for the old app, including where it appears in the Dock and Launchpad and which permissions it's been granted. The content replacement strategy works around this by treating the upgrade as an in-place upgrade. However, starting in macOS Ventura, these in-place upgrades are only allowed when the updater application (in this case, the terminal running Homebrew) has [certain permissions granted](https://github.com/Homebrew/brew/pull/15483). Either the "App Management" or "Full Disk Access" permission will suffice. +Homebrew has two possible strategies to update cask apps: uninstalling the old version and reinstalling the new one, or replacing the contents of the app with the new contents. With the uninstall/reinstall strategy, [macOS thinks the app is being deleted without any intent to reinstall it](https://github.com/Homebrew/brew/pull/15138), and so it removes some internal metadata for the old app, including where it appears in the Dock and Launchpad and which permissions it's been granted. The content replacement strategy works around this by treating the upgrade as an in-place upgrade. However, starting in macOS Ventura, these in-place upgrades are only allowed when the updater application (in this case, the terminal running Homebrew) has [certain permissions granted](https://github.com/Homebrew/brew/pull/15483). Either the "App Management" or "Full Disk Access" permission will suffice. Homebrew defaults to in-place upgrades when it has the necessary permissions. Otherwise, it will use the uninstall/reinstall strategy.