Skip to content

Commit

Permalink
Prevent Accessibility access for macOS >= 10.12
Browse files Browse the repository at this point in the history
See Homebrew/homebrew-cask#24519

Feel free to suggest alternative wording and such.
  • Loading branch information
Alex authored Sep 19, 2016
1 parent e22610a commit 15f3f20
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Library/Homebrew/cask/lib/hbc/installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,12 @@ def print_caveats
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)
Expand All @@ -248,7 +253,12 @@ def enable_accessibility_access

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: [
Expand Down

0 comments on commit 15f3f20

Please sign in to comment.