From b2359873d032615ccfef0ef07b4cc01996dee0be Mon Sep 17 00:00:00 2001 From: Markus Reiter <me@reitermark.us> Date: Mon, 6 Mar 2017 21:28:17 +0100 Subject: [PATCH] Move `legacy_cache` outside of `Locations`. --- Library/Homebrew/cask/lib/hbc/cache.rb | 7 ++++--- Library/Homebrew/cask/lib/hbc/locations.rb | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Library/Homebrew/cask/lib/hbc/cache.rb b/Library/Homebrew/cask/lib/hbc/cache.rb index 7b586528ed..4e99fdd4f6 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 4fb4a21914..7a0f938514 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 -- GitLab