diff --git a/Library/Homebrew/cask/lib/hbc/cache.rb b/Library/Homebrew/cask/lib/hbc/cache.rb index 7b586528ed5ba271856d27172350afbce5a55503..4e99fdd4f6b0aa29e6a45e16a2eeb7ec04fdcd23 100644 --- a/Library/Homebrew/cask/lib/hbc/cache.rb +++ b/Library/Homebrew/cask/lib/hbc/cache.rb @@ -10,10 +10,11 @@ module Hbc end def delete_legacy_cache - return unless Hbc.legacy_cache.exist? + legacy_cache = HOMEBREW_CACHE.join("Casks") + return unless legacy_cache.exist? - ohai "Deleting legacy cache at #{Hbc.legacy_cache}..." - FileUtils.remove_entry_secure(Hbc.legacy_cache) + ohai "Deleting legacy cache at #{legacy_cache}..." + FileUtils.remove_entry_secure(legacy_cache) end end end diff --git a/Library/Homebrew/cask/lib/hbc/locations.rb b/Library/Homebrew/cask/lib/hbc/locations.rb index 4fb4a21914a1f5ea4edb9e145e5b937e1a9c06e4..7a0f938514169837579d47ee85b721294d7986b0 100644 --- a/Library/Homebrew/cask/lib/hbc/locations.rb +++ b/Library/Homebrew/cask/lib/hbc/locations.rb @@ -38,10 +38,6 @@ module Hbc end end - def legacy_cache - @legacy_cache ||= HOMEBREW_CACHE.join("Casks") - end - attr_writer :cache def cache