Homebrew / homebrew-cask

🍻 A CLI workflow for the administration of macOS applications distributed as binaries
https://brew.sh
BSD 2-Clause "Simplified" License
20.93k stars 10.71k forks source link

keycastr install produces error #14136

Closed xanderdunn closed 9 years ago

xanderdunn commented 9 years ago

I'm reposting my bug #14133 in the hopes it isn't wantonly closed this time.

I'm on Mac OS X 10.11.1 (15B17c)

$ brew cask install --verbose keycastr
==> Downloading https://github.com/keycastr/keycastr/releases/download/v0.8.5/KeyCastr.app.zip
Already downloaded: /Library/Caches/Homebrew/keycastr-v0.8.5.zip
==> Symlinking App 'KeyCastr.app' to '/Users/admin/Applications/KeyCastr.app'
==> Enabling accessibility access
==> Error: table access has 7 columns but 6 values were supplied
Error: Command failed to execute!

==> Failed command:
["/usr/bin/sudo", "-E", "--", "/usr/bin/sqlite3", "#<Pathname:/Library/Application Support/com.apple.TCC/TCC.db>", "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','net.stephendeken.KeyCastr',0,1,1,NULL);"]

==> Output of failed command:

==> Exit status of failed command:
#<Process::Status: pid 4909 exit 1>
~ admin$ brew cask doctor
==> OS X Release:
10.11
==> OS X Release with Patchlevel:
10.11.1
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p645
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
0.9.5 (git revision 407c6; last commit 2015-10-01)
==> Homebrew Executable Path:
/usr/local/bin/brew
==> Homebrew Cellar Path:
/usr/local/Cellar
==> Homebrew Repository Path:
/usr/local
==> Homebrew Origin:
https://github.com/Homebrew/homebrew
==> Homebrew-cask Version:
0.56.0
==> Homebrew-cask Install Location:
/usr/local/Cellar/brew-cask/0.56.0
==> Homebrew-cask Staging Location:
/opt/homebrew-cask/Caskroom
==> Homebrew-cask Cached Downloads:
/Library/Caches/Homebrew
/Library/Caches/Homebrew/Casks
0 files
0.00 megs
==> Homebrew-cask Default Tap Path:
/usr/local/Library/Taps/caskroom/homebrew-cask
==> Homebrew-cask Alternate Cask Taps:
<NONE>
==> Homebrew-cask Default Tap Cask Count:
2774
==> Contents of $LOAD_PATH:
/usr/local/Cellar/brew-cask/0.56.0/rubylib
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin15
/Library/Ruby/Site/2.0.0/universal-darwin15
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin15
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin15
==> Contents of $RUBYLIB Environment Variable:
<NONE>
==> Contents of $RUBYOPT Environment Variable:
<NONE>
==> Contents of $RUBYPATH Environment Variable:
<NONE>
==> Contents of $RBENV_VERSION Environment Variable:
<NONE>
==> Contents of $CHRUBY_VERSION Environment Variable:
<NONE>
==> Contents of $GEM_HOME Environment Variable:
<NONE>
==> Contents of $GEM_PATH Environment Variable:
<NONE>
==> Contents of $BUNDLE_PATH Environment Variable:
<NONE>
==> Contents of $PATH Environment Variable:
PATH="/Users/admin/.gvm/vertx/current/bin:/Users/admin/.gvm/springboot/current/bin:/Users/admin/.gvm/lazybones/current/bin:/Users/admin/.gvm/jbossforge/current/bin:/Users/admin/.gvm/jbake/current/bin:/Users/admin/.gvm/groovyserv/current/bin:/Users/admin/.gvm/groovy/current/bin:/Users/admin/.gvm/griffon/current/bin:/Users/admin/.gvm/grails/current/bin:/Users/admin/.gvm/gradle/current/bin:/Users/admin/.gvm/glide/current/bin:/Users/admin/.gvm/gaiden/current/bin:/Users/admin/.gvm/crash/current/bin:/Users/admin/.gvm/asciidoctorj/current/bin:/Users/admin/.gem/bin:/usr/local/Cellar/llvm/HEAD/bin:/usr/local/bin:/usr/local/sbin:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/SharedFrameworks/DTDeviceKitBase.framework/Versions/A/Resources:/usr/local/opt/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/admin/.rvm/bin:/usr/local/Library/ENV/scm"
==> Contents of $SHELL Environment Variable:
SHELL="/bin/bash"
==> Contents of Locale Environment Variables:
LANG="en_US.UTF-8"
==> Running As Privileged User:
No
vitorgalvao commented 9 years ago

Works fine on a VMed Yosemite. Can anyone else on El Capitan reproduce, just so we’re sure that’s where the issue comes from?

adidalal commented 9 years ago

Can confirm that if fails on El Capitan with the same error

adidalal commented 9 years ago

@vitorgalvao Looks like 10.11 changes the TCC.db to require another NULL in the INSERT. (Based on https://gist.github.com/reitermarkus/54982e6367508dde7763)

ie, for 10.11+, it should be

"INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL,NULL);",

not sure how exactly you want to structure that conditional, but changes need to be @ https://github.com/caskroom/homebrew-cask/blob/master/lib/hbc/installer.rb#L221

vitorgalvao commented 9 years ago

Closing in favour of #14144.