aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorJosh Hagins2016-09-23 11:17:36 -0500
committerGitHub2016-09-23 11:17:36 -0500
commit8e1169085d4d843fe2cb9a444ffc8db0921899d1 (patch)
treefbfebb7fe51ad7892980bb96e6ce7a2dfb7bf72b /Library/Homebrew/cask/lib
parent246bb1a3b18cf41c2499cc78b7eac8fab503c5d6 (diff)
parent741e68766368b4ad18120a81b2180743790b529e (diff)
downloadbrew-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.rb13
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