mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Merge pull request #20168 from tyuwags/json-update-migrator
updating json with `cask/migrator`
This commit is contained in:
commit
9fa50e5e12
@ -80,6 +80,7 @@ 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