Skip to content
Snippets Groups Projects
Commit f0249118 authored by Markus Reiter's avatar Markus Reiter Committed by GitHub
Browse files

Merge pull request #1618 from rwanyoike/cask-reinstall-order

cask reinstall: download and verify cask before uninstall
parents 33b34b49 0d67e35f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment