12 Commits

Author SHA1 Message Date
Markus Reiter
ffc47388bd Fix Pkg#uninstall not calling MacOS.undeletable? for all files. 2017-08-06 13:19:30 +02:00
Markus Reiter
80e09c8dec Partly revert “Fix uninstall :pkgutil leaving empty .app directories.”. 2017-04-21 16:46:39 +02:00
Markus Reiter
642e355b4f Save flags in with_full_permissions. 2017-03-11 10:47:39 +01:00
Markus Reiter
9393b16930 Fix uninstall :pkgutil leaving empty .app directories. 2017-03-11 10:47:39 +01:00
Markus Reiter
17bd6fe3ca Refactor Cask pkg artifact. 2017-03-08 08:16:16 +01:00
Markus Reiter
fc712b0089 Make descriptions a bit clearer. 2017-02-04 20:27:59 +01:00
Nathan Toone
6d318761d2 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.
2016-12-28 11:57:47 -07:00
Kaito Udagawa
63e7fb5cae cask: Delete package dir if it is symlink on the uninstall
When a Formula is converted into a Cask (e.g. osxfuse),
a symlink remains at the place of package dir.
This change ensure to remove such leftovers.
2016-11-22 03:10:42 +09:00
Markus Reiter
8d15bddedb Auto-correct block delimiters. 2016-10-23 14:44:14 +02:00
Markus Reiter
40b7e36746 Use 0-only prefix for octal numbers. 2016-10-23 14:13:16 +02:00
Markus Reiter
b86c8efb79 Cask: Use nested classes and modules. 2016-09-24 16:00:58 +02:00
AnastasiaSulyagina
e81f4ab7de init 2016-08-19 14:50:14 +03:00