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
This commit is contained in:
Gibson Fahnestock 2020-05-26 20:17:10 +01:00
parent bc882c6c28
commit 3098c4735b
No known key found for this signature in database
GPG Key ID: B01FBB92821C587A

View File

@ -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