updating json to add old_token when a migration is made

This commit is contained in:
thibhero 2025-06-24 12:03:41 -04:00
parent 3495ea576c
commit f34f1c4a33

View File

@ -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"] = (json["old_tokens"] << old_token).uniq
path.atomic_write json.to_json path.atomic_write json.to_json
end end
end end