Move legacy_cache outside of Locations.

This commit is contained in:
Markus Reiter 2017-03-06 21:28:17 +01:00
parent 1959cc3f2d
commit b2359873d0
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -38,10 +38,6 @@ module Hbc
end
end
def legacy_cache
@legacy_cache ||= HOMEBREW_CACHE.join("Casks")
end
attr_writer :cache
def cache