From 10ad72c348ac895b3a628100bf390f5913ae3aa0 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 20 Mar 2025 16:22:41 +0000 Subject: [PATCH] quarantine: allow skipping the app management permissions prompt. If we know that we don't care about this prompt, let's allow setting a variable to avoid alarming users. --- Library/Homebrew/cask/quarantine.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/cask/quarantine.rb b/Library/Homebrew/cask/quarantine.rb index ae680b0d23..c113f1add2 100644 --- a/Library/Homebrew/cask/quarantine.rb +++ b/Library/Homebrew/cask/quarantine.rb @@ -256,11 +256,14 @@ module Cask end end - opoo <<~EOF - Your terminal does not have App Management permissions, so Homebrew will delete and reinstall the app. - This may result in some configurations (like notification settings or location in the Dock/Launchpad) being lost. - To fix this, go to System Settings > Privacy & Security > App Management and add or enable your terminal. - EOF + # Allow undocumented way to skip the prompt. + if ENV["HOMEBREW_NO_APP_MANAGEMENT_PERMISSIONS_PROMPT"] + opoo <<~EOF + Your terminal does not have App Management permissions, so Homebrew will delete and reinstall the app. + This may result in some configurations (like notification settings or location in the Dock/Launchpad) being lost. + To fix this, go to System Settings > Privacy & Security > App Management and add or enable your terminal. + EOF + end false end