Don't redownload “latest” casks unnecessarily.
This commit is contained in:
parent
7640dfe601
commit
b12623f4eb
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user