Merge pull request #7587 from Rylan12/cask-zap-full-disk-access

brew cask zap prompt when Full Disk Access is needed
This commit is contained in:
Markus Reiter 2020-05-31 23:41:25 +02:00 committed by GitHub
commit b2ccf3ba78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -326,7 +326,14 @@ module Cask
next next
end end
yield path, Pathname.glob(resolved_path) begin
yield path, Pathname.glob(resolved_path)
rescue Errno::EPERM
raise if File.readable?(File.expand_path("~/Library/Application Support/com.apple.TCC"))
odie "Unable to remove some files. Please enable Full Disk Access for your terminal under " \
"System Preferences → Security & Privacy → Privacy → Full Disk Access."
end
end end
end end