aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAlex2016-09-19 11:18:17 -0700
committerGitHub2016-09-19 11:18:17 -0700
commit15f3f2065625b05496632c1f5cf61fd150afef3c (patch)
treecd348b3888589b7b754f7458b5d755cc6025bf40 /Library
parente22610aedd550cb5577dd08cedb7a5609d0ff0b8 (diff)
downloadbrew-15f3f2065625b05496632c1f5cf61fd150afef3c.tar.bz2
Prevent Accessibility access for macOS >= 10.12
See https://github.com/caskroom/homebrew-cask/issues/24519 Feel free to suggest alternative wording and such.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc/installer.rb14
1 files changed, 12 insertions, 2 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb
index 72a9b3077..8c948d717 100644
--- a/Library/Homebrew/cask/lib/hbc/installer.rb
+++ b/Library/Homebrew/cask/lib/hbc/installer.rb
@@ -225,7 +225,12 @@ class Hbc::Installer
def enable_accessibility_access
return unless @cask.accessibility_access
ohai "Enabling accessibility access"
- if MacOS.version <= :mountain_lion
+ if MacOS.version >= :sierra
+ opoo <<-EOS.undent
+ Access denied to accessibility DB (TCC.db) by SIP on this version of macOS.
+ If needed, enable manually via the app or System Preferences.
+ EOS
+ elsif MacOS.version <= :mountain_lion
@command.run!("/usr/bin/touch",
args: [Hbc.pre_mavericks_accessibility_dotfile],
sudo: true)
@@ -248,7 +253,12 @@ class Hbc::Installer
def disable_accessibility_access
return unless @cask.accessibility_access
- if MacOS.version >= :mavericks
+ if MacOS.version >= :sierra
+ opoo <<-EOS.undent
+ Access denied to accessibility DB (TCC.db) by SIP on this version of macOS.
+ If needed, disable manually via the app or System Preferences.
+ EOS
+ elsif MacOS.version >= :mavericks
ohai "Disabling accessibility access"
@command.run!("/usr/bin/sqlite3",
args: [