Fix wrong token in Cask::Migrator.

This commit is contained in:
Markus Reiter 2023-05-18 18:59:46 +02:00
parent 16b2a14c94
commit beb4c044c2
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -25,10 +25,9 @@ module Cask
return unless (installed_caskfile = new_cask.installed_caskfile) return unless (installed_caskfile = new_cask.installed_caskfile)
installed_token = installed_caskfile.relative_path_from(Caskroom.path).basename.to_s
return if new_cask.token == installed_token
old_cask = CaskLoader.load(installed_caskfile) old_cask = CaskLoader.load(installed_caskfile)
return if new_cask.token == old_cask.token
migrator = new(old_cask, new_cask) migrator = new(old_cask, new_cask)
migrator.migrate(dry_run: dry_run) migrator.migrate(dry_run: dry_run)
end end