update-report: prune on cask migration. (#428)

Do this to ensure that any symlinks in the Homebrew prefix and/or in
Applications are removed to stop issues with stale symlinks causing
Casks from being installed correctly.
This commit is contained in:
Mike McQuaid 2016-07-03 14:34:38 -05:00 committed by GitHub
parent a97661a548
commit 0478c2fc0f

View File

@ -255,6 +255,7 @@ class Reporter
if new_tap.installed? && (HOMEBREW_REPOSITORY/"Caskroom").directory? if new_tap.installed? && (HOMEBREW_REPOSITORY/"Caskroom").directory?
ohai "#{name} has been moved to Homebrew Cask. Installing #{name}..." ohai "#{name} has been moved to Homebrew Cask. Installing #{name}..."
system HOMEBREW_BREW_FILE, "uninstall", "--force", name system HOMEBREW_BREW_FILE, "uninstall", "--force", name
system HOMEBREW_BREW_FILE, "prune"
system HOMEBREW_BREW_FILE, "cask", "install", name system HOMEBREW_BREW_FILE, "cask", "install", name
else else
ohai "#{name} has been moved to Homebrew Cask.", <<-EOS.undent ohai "#{name} has been moved to Homebrew Cask.", <<-EOS.undent