From 15f3f2065625b05496632c1f5cf61fd150afef3c Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 19 Sep 2016 11:18:17 -0700 Subject: [PATCH] Prevent Accessibility access for macOS >= 10.12 See https://github.com/caskroom/homebrew-cask/issues/24519 Feel free to suggest alternative wording and such. --- Library/Homebrew/cask/lib/hbc/installer.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index 72a9b30774d2b..8c948d7175f45 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -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) @@ -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: [