Remove download sha file from .metadata dir when uninstalling casks

This commit is contained in:
apainintheneck 2022-06-05 13:00:20 -07:00
parent 6b3eb93010
commit 4dce389aa7

View File

@ -403,7 +403,10 @@ module Cask
def uninstall
oh1 "Uninstalling Cask #{Formatter.identifier(@cask)}"
uninstall_artifacts(clear: true)
remove_config_file if !reinstall? && !upgrade?
if !reinstall? && !upgrade?
remove_download_sha
remove_config_file
end
purge_versioned_files
purge_caskroom_path if force?
end
@ -413,6 +416,10 @@ module Cask
@cask.config_path.parent.rmdir_if_possible
end
def remove_download_sha
FileUtils.rm_f @cask.download_sha_path if @cask.download_sha_path.exist?
end
def start_upgrade
uninstall_artifacts
backup