diff options
| author | Markus Reiter | 2016-12-09 17:24:05 +0100 |
|---|---|---|
| committer | GitHub | 2016-12-09 17:24:05 +0100 |
| commit | f02491180b199c370d1f930eb6fa50326e14348a (patch) | |
| tree | 352f3dc80290eab25ec127939d9028da65ac22a7 /Library/Homebrew/cask/lib | |
| parent | 33b34b497c673e4a18fa332c82b9301dc784fffa (diff) | |
| parent | 0d67e35fb7b2db8157cc6650f31e601875073b42 (diff) | |
| download | brew-f02491180b199c370d1f930eb6fa50326e14348a.tar.bz2 | |
Merge pull request #1618 from rwanyoike/cask-reinstall-order
cask reinstall: download and verify cask before uninstall
Diffstat (limited to 'Library/Homebrew/cask/lib')
| -rw-r--r-- | Library/Homebrew/cask/lib/hbc/cli/reinstall.rb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb index 3560a4795..30d9b694c 100644 --- a/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb +++ b/Library/Homebrew/cask/lib/hbc/cli/reinstall.rb @@ -7,6 +7,13 @@ module Hbc begin cask = Hbc.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 @@ -26,10 +33,11 @@ module Hbc Installer.new(installed_cask, force: true).uninstall end - Installer.new(cask, - force: force, - skip_cask_deps: skip_cask_deps, - require_sha: require_sha).install + installer.stage + installer.install_artifacts + installer.enable_accessibility_access + puts installer.summary + count += 1 rescue CaskUnavailableError => e warn_unavailable_with_suggestion cask_token, e |
