Catch ENOTEMPTY in cleanup_keg

#11904
This commit is contained in:
Kaito Udagawa 2021-10-19 23:39:58 +09:00
parent ff2985c6aa
commit 6b5f912a3a

View File

@ -269,7 +269,7 @@ module Homebrew
def cleanup_keg(keg) def cleanup_keg(keg)
cleanup_path(keg) { keg.uninstall(raise_failures: true) } cleanup_path(keg) { keg.uninstall(raise_failures: true) }
rescue Errno::EACCES => e rescue Errno::EACCES, Errno::ENOTEMPTY => e
opoo e.message opoo e.message
unremovable_kegs << keg unremovable_kegs << keg
end end