Merge pull request #13384 from apainintheneck/rm-cask-dl-sha-file

Remove download sha file from .metadata dir when uninstalling casks
This commit is contained in:
Bo Anderson 2022-06-06 00:57:50 +01:00 committed by GitHub
commit 5bc29fa77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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