diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index b9108f3e0838c..b463952832557 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -697,7 +697,7 @@ def audit_specs .second begin - if (release = GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{repo}/releases/tags/#{tag}")) + if @online && (@release = GitHub.open_api("#{GitHub::API_URL}/repos/#{owner}/#{repo}/releases/tags/#{tag}")) problem "#{tag} is a GitHub prerelease" if release["prerelease"] problem "#{tag} is a GitHub draft" if release["draft"] end