diff options
| author | Markus Reiter | 2017-04-23 02:40:52 +0200 |
|---|---|---|
| committer | GitHub | 2017-04-23 02:40:52 +0200 |
| commit | cb17a80577bbf8812ca4ee6eef97039cd34ebe3e (patch) | |
| tree | 0c8cf2862b754cd26a5280d39624102c3c1ad377 /Library/Homebrew/cask/lib/hbc/cli | |
| parent | 64e2e6e86272ef6ca6bf36a8efcf0a42849c87bb (diff) | |
| parent | cb28ab640e191500d480308ca262366184518022 (diff) | |
| download | brew-cb17a80577bbf8812ca4ee6eef97039cd34ebe3e.tar.bz2 | |
Merge pull request #2362 from joshka/install-uninstall-messages
Install uninstall messages
Diffstat (limited to 'Library/Homebrew/cask/lib/hbc/cli')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/reinstall.rb | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb index b52c43328..c2ed8f462 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb @@ -7,30 +7,10 @@ module Hbc begin cask = CaskLoader.load(cask_token) - installer = Installer.new(cask, - force: force, - skip_cask_deps: skip_cask_deps, - require_sha: require_sha) - installer.print_caveats - installer.fetch - - if cask.installed? - # use copy of cask for uninstallation to avoid 'No such file or directory' bug - installed_cask = cask - - # use the same cask file that was used for installation, if possible - if (installed_caskfile = installed_cask.installed_caskfile).exist? - installed_cask = CaskLoader.load_from_file(installed_caskfile) - end - - # Always force uninstallation, ignore method parameter - Installer.new(installed_cask, force: true).uninstall - end - - installer.stage - installer.install_artifacts - installer.enable_accessibility_access - puts installer.summary + Installer.new(cask, + force: force, + skip_cask_deps: skip_cask_deps, + require_sha: require_sha).reinstall count += 1 rescue CaskUnavailableError => e |
