diff options
| author | Markus Reiter | 2017-08-06 12:30:40 +0200 |
|---|---|---|
| committer | Markus Reiter | 2017-08-06 13:19:30 +0200 |
| commit | ffc47388bd243267ea4c1dc24f58c782f5c42428 (patch) | |
| tree | ffdd010ae9f6e7c631dbbdeb53c14d017c64d988 /Library/Homebrew/cask/lib | |
| parent | c2cbfc1526a0bbb50683e057ceed0210cef06e83 (diff) | |
| download | brew-ffc47388bd243267ea4c1dc24f58c782f5c42428.tar.bz2 | |
Fix `Pkg#uninstall` not calling `MacOS.undeletable?` for all files.
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/pkg.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/pkg.rb b/Library/Homebrew/cask/lib/hbc/pkg.rb index c9aa3180f..8938268a2 100644 --- a/Library/Homebrew/cask/lib/hbc/pkg.rb +++ b/Library/Homebrew/cask/lib/hbc/pkg.rb @@ -16,19 +16,17 @@ module Hbc def uninstall unless pkgutil_bom_files.empty? odebug "Deleting pkg files" - @command.run("/usr/bin/xargs", args: ["-0", "--", "/bin/rm", "--"], input: pkgutil_bom_files.join("\0"), sudo: true) + @command.run!("/usr/bin/xargs", args: ["-0", "--", "/bin/rm", "--"], input: pkgutil_bom_files.join("\0"), sudo: true) end unless pkgutil_bom_specials.empty? odebug "Deleting pkg symlinks and special files" - @command.run("/usr/bin/xargs", args: ["-0", "--", "/bin/rm", "--"], input: pkgutil_bom_specials.join("\0"), sudo: true) + @command.run!("/usr/bin/xargs", args: ["-0", "--", "/bin/rm", "--"], input: pkgutil_bom_specials.join("\0"), sudo: true) end unless pkgutil_bom_dirs.empty? odebug "Deleting pkg directories" deepest_path_first(pkgutil_bom_dirs).each do |dir| - next if MacOS.undeletable?(dir) - with_full_permissions(dir) do clean_broken_symlinks(dir) clean_ds_store(dir) @@ -67,6 +65,7 @@ module Hbc .stdout .split("\n") .map { |path| root.join(path) } + .reject(&MacOS.public_method(:undeletable?)) end def root |
