gpgtools: reset owner on ~/.gnupg

fixes #3360
This commit is contained in:
Roland Walker 2014-03-04 12:10:21 -05:00
parent 667e06591a
commit 643cf770d6
1 changed files with 5 additions and 0 deletions

View File

@ -7,4 +7,9 @@ class Gpgtools < Cask
uninstall(
:pkgutil => 'org.gpgtools.*'
)
after_install do
system '/usr/bin/sudo', '-E', '--',
'/usr/local/MacGPG2/libexec/fixGpgHome', Etc.getpwuid(Process.euid).name,
ENV['GNUPGHOME'] ? ENV['GNUPGHOME'] : "#{ENV['HOME']}/.gnupg"
end
end