cask/migrator: tweak syntax.

This commit is contained in:
Mike McQuaid 2025-06-25 08:54:05 +01:00 committed by GitHub
parent f34f1c4a33
commit b63ad37eeb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,7 +80,7 @@ module Cask
when ".json"
json = JSON.parse(path.read)
json["token"] = new_token
json["old_tokens"] = (json["old_tokens"] << old_token).uniq
json["old_tokens"] = [old_token, *json["old_tokens"]].compact.uniq
path.atomic_write json.to_json
end
end