brew update-reset && brew update and retried my command.brew doctor, fixed as many issues as possible and retried my command.https://github.com/Homebrew/brew/blob/master/Library/Homebrew/cask/lib/hbc/installer.rb#L342
# Make sure the `uninstall` stanza is run first, as it
# may depend on other artifacts still being installed.
artifacts = artifacts.sort_by { |a| a.is_a?(Artifact::Uninstall) ? -1 : 1 }
-----
#### Output of your command with `--verbose --debug`
[parallels-desktop.rb](https://github.com/caskroom/homebrew-cask/blob/master/Casks/parallels-desktop.rb)
brew cask uninstall parallels-desktop --verbose --debug ==> Uninstalling Cask parallels-desktop ==> Hbc::Installer#uninstall ==> Un-installing artifacts ==> Determining which artifacts are present in Cask parallels-desktop ==> 5 artifact/s defined #Hbc::Artifact::Uninstall:0x007f9501b96750> #Hbc::Artifact::PreflightBlock:0x007f9501b96840> #Hbc::Artifact::App:0x007f9501b967c8> #Hbc::Artifact::PostflightBlock:0x007f9501b966d8> #Hbc::Artifact::Zap:0x007f9501b96660> ==> Un-installing artifact of class Hbc::Artifact::Uninstall ==> Running uninstall process for parallels-desktop; your password may be necessary ==> Removing files: /usr/local/bin/prl_convert ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prl_disk_tool ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prl_perf_ctl ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prlcore2dmp ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prlctl ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prlexec ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] /usr/local/bin/prlsrvctl ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] ==> Un-installing artifact of class Hbc::Artifact::PreflightBlock ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/sbin/chown", "-R", "--", "commitay:staff", "/Applications/Parallels Desktop.app"] ==> Un-installing artifact of class Hbc::Artifact::App ==> Removing App '/Applications/Parallels Desktop.app'. ==> Un-installing artifact of class Hbc::Artifact::PostflightBlock ==> Purging files for version 12.2.0-41591 of Cask parallels-desktop
brew cask uninstall whatsyoursign --verbose --debug ==> Uninstalling Cask whatsyoursign ==> Hbc::Installer#uninstall ==> Un-installing artifacts ==> Determining which artifacts are present in Cask whatsyoursign ==> 3 artifact/s defined #Hbc::Artifact::Uninstall:0x007fb5ced2cb08> #Hbc::Artifact::Installer:0x007fb5ced2cb80> #Hbc::Artifact::PreflightBlock:0x007fb5ced2cbf8> ==> Un-installing artifact of class Hbc::Artifact::Uninstall ==> Running uninstall process for whatsyoursign; your password may be necessary ==> Removing files: /Applications/WhatsYourSign.app ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] ~/Library/Application Scripts/com.objective-see.WhatsYourSignExt.FinderSync ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] ~/Library/Containers/com.objective-see.WhatsYourSignExt.FinderSync ==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/bin/xargs", "-0", "--", "/bin/rm", "-r", "-f", "--"] ==> Un-installing artifact of class Hbc::Artifact::PreflightBlock ==> Executing: ["/usr/bin/pluginkit", "-r", "/Applications/WhatsYourSign.app/Contents/PlugIns/WhatsYourSign.appex"] ==> Purging files for version 1.2.3 of Cask whatsyoursign
brew cask doctorbrew cask doctor
==> Homebrew-Cask Version
Homebrew-Cask 1.1.12
caskroom/homebrew-cask (git revision ebc7; last commit 2017-04-13)
==> Homebrew-Cask Install Location
<NONE>
==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask (1 files, 1.8MB)
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3633 casks)
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core (0 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/Library/Ruby/Site/2.0.0
/Library/Ruby/Site/2.0.0/x86_64-darwin16
/Library/Ruby/Site/2.0.0/universal-darwin16
/Library/Ruby/Site
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby/2.0.0/universal-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/vendor_ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/x86_64-darwin16
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin16
==> Environment Variables
LANG="en_AU.UTF-8"
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/bin/bash"
brew doctorYour system is ready to brew.
brew configbrew config
HOMEBREW_VERSION: 1.1.12
ORIGIN: https://github.com/Homebrew/brew
HEAD: 8ea778f7c7ea790694485030d105a92a9416ef33
Last commit: 10 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 07ff76bd33cbe688845dc2e8d743528cc47e6d0e
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: dual-core 64-bit sandybridge
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.11.0 => /Library/Developer/CommandLineTools/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: N/A
macOS: 10.12.4-x86_64
Xcode: N/A
CLT: 8.3.0.0.1.1490382677
X11: N/A
Ping @reitermarkus.
Just adding real-vnc here as an issue as well. I opened up an issue before I noticed this one.
I've been testing this some more and I'm yet to find a cask where removing this actually breaks the uninstall.
artifacts = artifacts.sort_by { |a| a.is_a?(Artifact::Uninstall) ? -1 : 1 }
@commitay, this was a fairly recent change, and there definitely was a cask which failed because of this. It is probably linked in the PR of the change.
It is probably linked in the PR of the change.
keybase but it does not seem to be impacted by this.
Edit: Sorry, I missed "was"
So if I read this right there are two options:
preflight any more.Have I understood where this stands correctly?
At this stage, I only have real-vnc which I've seen that suffers from this problem, at least from casks that require an update.
I think we need to go with 1: “Make uninstall_preflight run before uninstall, either by reverting the change or an additional sort”. preflights were introduced as a necessity.
Started a PR to revert the change. https://github.com/Homebrew/brew/issues/2594~~
Because of the updated keybase uninstall in https://github.com/caskroom/homebrew-cask/pull/33534 the uninstall sort is required, so an additional sort will have to be added for uninstall_preflight.
Most helpful comment
Just adding
real-vnchere as an issue as well. I opened up an issue before I noticed this one.