mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
cask/installer: remove migration symlinks on uninstall
This commit is contained in:
parent
c86a5a1b74
commit
29122c0008
@ -792,10 +792,10 @@ on_request: true)
|
|||||||
|
|
||||||
if installed_caskfile&.exist?
|
if installed_caskfile&.exist?
|
||||||
begin
|
begin
|
||||||
@cask = CaskLoader.load(installed_caskfile)
|
@cask = CaskLoader.load_from_installed_caskfile(installed_caskfile)
|
||||||
return
|
return
|
||||||
rescue CaskInvalidError
|
rescue CaskInvalidError, CaskUnavailableError
|
||||||
# could be caused by trying to load outdated caskfile
|
# could be caused by trying to load outdated or deleted caskfile
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,7 +80,6 @@ module Cask
|
|||||||
when ".json"
|
when ".json"
|
||||||
json = JSON.parse(path.read)
|
json = JSON.parse(path.read)
|
||||||
json["token"] = new_token
|
json["token"] = new_token
|
||||||
json["old_tokens"] = [old_token, *json["old_tokens"]].compact.uniq
|
|
||||||
path.atomic_write json.to_json
|
path.atomic_write json.to_json
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user