Only suggest adding livecheck it auto-detection fails.

This commit is contained in:
Markus Reiter 2021-04-07 02:19:16 +02:00
parent 1781b37100
commit ba87bfc4e4
No known key found for this signature in database
GPG Key ID: 245293B51702655B
2 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,7 @@ module Cask
case cask.url.to_s
when %r{sourceforge.net/(\S+)}
return if cask.version.latest?
return unless online?
add_error "Download is hosted on SourceForge, #{add_livecheck}"
when %r{dl.devmate.com/(\S+)}

View File

@ -630,6 +630,7 @@ describe Cask::Audit, :cask do
context "when the download is hosted on SourceForge and does not have a livecheck" do
let(:cask_token) { "sourceforge-correct-url-format" }
let(:online) { true }
it { is_expected.to fail_with(message) }
end