cask/quarantine: fix exception not being caught

Changes the rescue clause to also handle EPERM.

This fixes the issue of cask upgrades/reinstalls to failing due to
permissions [1]. It's worth noting though, the prompt for allowing App
Management permissions does not seem to occur, so that's something else
to be investigated.

1. https://github.com/Homebrew/homebrew-cask/issues/148253

Signed-off-by: Ismayil Mirzali <ismayilmirzeli@gmail.com>
This commit is contained in:
Ismayil Mirzali 2023-06-04 18:04:11 +03:00
parent e9a1cd41d7
commit 8a52ae2933
No known key found for this signature in database

View File

@ -217,7 +217,7 @@ module Cask
File.write(test_file, "") File.write(test_file, "")
test_file.delete test_file.delete
return true return true
rescue Errno::EACCES rescue Errno::EACCES, Errno::EPERM
# Using error handler below # Using error handler below
end end
else else