From 3098c4735beed7d98a70cac4675dca85e42e2ea4 Mon Sep 17 00:00:00 2001 From: Gibson Fahnestock Date: Tue, 26 May 2020 20:17:10 +0100 Subject: [PATCH] caveats: add an unsigned_accessibility caveat message This is useful for applications that are not signed by the developer and require Accessibility access. Because the app is not signed, macOS only authorizes the current binary, and so when it is updated (and the binary changes) the new version is unsigned, despite the app still showing as ticked in System Preferences. The user has to manually untick and retick the app each time. The ideal fix is for the developer to sign their app, but not all developers are willing to pay for this, so the best we can do is to advise users of the workaround/solution. Refs: https://github.com/Homebrew/homebrew-cask/pull/83157 --- Library/Homebrew/cask/dsl/caveats.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Library/Homebrew/cask/dsl/caveats.rb b/Library/Homebrew/cask/dsl/caveats.rb index 035c1d6a3b..b6105915e4 100644 --- a/Library/Homebrew/cask/dsl/caveats.rb +++ b/Library/Homebrew/cask/dsl/caveats.rb @@ -58,6 +58,19 @@ module Cask EOS end + caveat :unsigned_accessibility do |access = "Accessibility"| + # access: the category in System Preferences -> Security & Privacy -> Privacy the app requires. + + <<~EOS + #{@cask} is not signed and requires Accessibility access, + so you will need to re-grant Accessibility access every time the app is updated. + + Enable or re-enable it in: + System Preferences → Security & Privacy → Privacy -> #{access} + To re-enable untick and retick #{@cask}.app. + EOS + end + caveat :path_environment_variable do |path| <<~EOS To use #{@cask}, you may need to add the #{path} directory