Merge pull request #7644 from issyl0/audit-fix-regex-parsing-for-git

audit: Fix Regexp for stripping `.git` from repo URLs
This commit is contained in:
Issy Long 2020-05-25 13:23:37 +01:00 committed by GitHub
commit a56c305f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,10 +144,7 @@ module Homebrew
errors_summary = "#{problem_plural} in #{formula_plural} detected"
errors_summary += ", #{corrected_problem_plural} corrected" if corrected_problem_count.positive?
if problem_count.positive? ||
(new_formula_problem_count.positive? && !created_pr_comment)
ofail errors_summary
end
ofail errors_summary if problem_count.positive? || new_formula_problem_count.positive?
end
def format_problem_lines(problems)
@ -597,7 +594,7 @@ module Homebrew
_, user, repo = *regex.match(formula.homepage) unless user
return if !user || !repo
repo.gsub!(/.git$/, "")
repo.delete_suffix!(".git")
[user, repo]
end