aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dev-cmd/create.rb
diff options
context:
space:
mode:
authorNathan Toone2016-12-28 10:56:03 -0700
committerNathan Toone2016-12-28 11:57:47 -0700
commit6d318761d21e43ef8785ae4da24b8f6fdbd52db8 (patch)
tree037d2b7ef2b2573be5b8d9c3ff8e35d9a56894b2 /Library/Homebrew/dev-cmd/create.rb
parent6648ff130781279de560ad1ac77379a6250d16e4 (diff)
downloadbrew-6d318761d21e43ef8785ae4da24b8f6fdbd52db8.tar.bz2
Delete pkgutil directories that are really files.
Sometimes, pkgutil will return actual files (usually .nib files) as if they were part of the directory. Microsoft Office is an example of this: in a recent update the file `/Library/Application Support/Microsoft/MAU2.0/Microsoft AutoUpdate.app/Contents/SharedSupport/Microsoft Error Reporting.app/Contents/Resources/en.lproj/MainWindowAlt.nib` was returning from `/usr/sbin/pkgutil --only-dirs --files com.microsoft.package.component` even though it should have been a file instead of a directory. This caused the `rmdir` command to fail. This patch will check if we are trying to delete a “directory” that is really a “file” - and if we are, we just delete the file instead. This will allow packages that get in this state to be uninstalled. A unit test which can be run using `brew cask-tests` is also included.
Diffstat (limited to 'Library/Homebrew/dev-cmd/create.rb')
0 files changed, 0 insertions, 0 deletions