diff --git a/Library/Homebrew/cask/download.rb b/Library/Homebrew/cask/download.rb index eb3a444bc4..4bd4e4426a 100644 --- a/Library/Homebrew/cask/download.rb +++ b/Library/Homebrew/cask/download.rb @@ -35,7 +35,7 @@ module Cask attr_accessor :downloaded_path def clear_cache - downloader.clear_cache if force || cask.version.latest? + downloader.clear_cache if force end def fetch diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 5afb8c13ed..924c17f117 100644 --- a/Library/Homebrew/download_strategy.rb +++ b/Library/Homebrew/download_strategy.rb @@ -296,6 +296,8 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy fresh = if cached_location.exist? && url_time url_time <= cached_location.mtime + elsif version.respond_to?(:latest?) + !version.latest? else true end