diff options
| author | Josh Hagins | 2016-09-23 11:17:36 -0500 |
|---|---|---|
| committer | GitHub | 2016-09-23 11:17:36 -0500 |
| commit | 8e1169085d4d843fe2cb9a444ffc8db0921899d1 (patch) | |
| tree | fbfebb7fe51ad7892980bb96e6ce7a2dfb7bf72b /Library/Homebrew/cask/lib | |
| parent | 246bb1a3b18cf41c2499cc78b7eac8fab503c5d6 (diff) | |
| parent | 741e68766368b4ad18120a81b2180743790b529e (diff) | |
| download | brew-8e1169085d4d843fe2cb9a444ffc8db0921899d1.tar.bz2 | |
Merge pull request #1029 from wickles/patch-1
Prevent Accessibility access for macOS >= 10.12
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/installer.rb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb index fad79644e..ea67078f5 100644 --- a/Library/Homebrew/cask/lib/hbc/installer.rb +++ b/Library/Homebrew/cask/lib/hbc/installer.rb @@ -236,19 +236,24 @@ class Hbc::Installer "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL);", ], sudo: true) - else + elsif MacOS.version <= :el_capitan @command.run!("/usr/bin/sqlite3", args: [ Hbc.tcc_db, "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL,NULL);", ], sudo: true) + else + opoo <<-EOS.undent + Accessibility access cannot be enabled automatically on this version of macOS. + See System Preferences to enable it manually. + EOS end end def disable_accessibility_access return unless @cask.accessibility_access - if MacOS.version >= :mavericks + if MacOS.version >= :mavericks && MacOS.version <= :el_capitan ohai "Disabling accessibility access" @command.run!("/usr/bin/sqlite3", args: [ @@ -258,8 +263,8 @@ class Hbc::Installer sudo: true) else opoo <<-EOS.undent - Accessibility access was enabled for #{@cask}, but it is not safe to disable - automatically on this version of macOS. See System Preferences. + Accessibility access cannot be disabled automatically on this version of macOS. + See System Preferences to disable it manually. EOS end end |
