From 8a52ae2933d56e7b58b888024c4476ec4f888b8f Mon Sep 17 00:00:00 2001 From: Ismayil Mirzali Date: Sun, 4 Jun 2023 18:04:11 +0300 Subject: [PATCH] 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 --- Library/Homebrew/cask/quarantine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/quarantine.rb b/Library/Homebrew/cask/quarantine.rb index dcad88d7c9..5174207c7d 100644 --- a/Library/Homebrew/cask/quarantine.rb +++ b/Library/Homebrew/cask/quarantine.rb @@ -217,7 +217,7 @@ module Cask File.write(test_file, "") test_file.delete return true - rescue Errno::EACCES + rescue Errno::EACCES, Errno::EPERM # Using error handler below end else