diff --git a/Library/Homebrew/cask/migrator.rb b/Library/Homebrew/cask/migrator.rb index 1b96488695..c27c76aba6 100644 --- a/Library/Homebrew/cask/migrator.rb +++ b/Library/Homebrew/cask/migrator.rb @@ -80,6 +80,7 @@ module Cask when ".json" json = JSON.parse(path.read) json["token"] = new_token + json["old_tokens"] = [old_token, *json["old_tokens"]].compact.uniq path.atomic_write json.to_json end end