aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cask/lib
diff options
context:
space:
mode:
authorMarkus Reiter2016-12-09 17:24:05 +0100
committerGitHub2016-12-09 17:24:05 +0100
commitf02491180b199c370d1f930eb6fa50326e14348a (patch)
tree352f3dc80290eab25ec127939d9028da65ac22a7 /Library/Homebrew/cask/lib
parent33b34b497c673e4a18fa332c82b9301dc784fffa (diff)
parent0d67e35fb7b2db8157cc6650f31e601875073b42 (diff)
downloadbrew-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.rb16
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