formula_auditor: ensure tag is not nil when doing online audit

Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
Rui Chen 2024-08-24 16:02:49 -04:00
parent ff8bb50cfa
commit a4dd50f6f1
No known key found for this signature in database
GPG Key ID: 6577287BDCA70840

View File

@ -802,7 +802,7 @@ module Homebrew
tag = SharedAudits.github_tag_from_url(url)
tag ||= formula.stable.specs[:tag]
if @online
if @online && !tag.nil?
error = SharedAudits.github_release(owner, repo, tag, formula:)
problem error if error
end