diff --git a/Library/Homebrew/cask/audit.rb b/Library/Homebrew/cask/audit.rb index 956f19696c..504c73e3be 100644 --- a/Library/Homebrew/cask/audit.rb +++ b/Library/Homebrew/cask/audit.rb @@ -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+)} diff --git a/Library/Homebrew/test/cask/audit_spec.rb b/Library/Homebrew/test/cask/audit_spec.rb index 81641254c9..dc8600afc4 100644 --- a/Library/Homebrew/test/cask/audit_spec.rb +++ b/Library/Homebrew/test/cask/audit_spec.rb @@ -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