Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audit: Fix Regexp for stripping .git from repo URLs #7644

Merged
merged 2 commits into from May 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions Library/Homebrew/dev-cmd/audit.rb
Expand Up @@ -144,10 +144,7 @@ def audit
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)
Expand Down Expand Up @@ -597,7 +594,7 @@ def get_repo_data(regex)
_, user, repo = *regex.match(formula.homepage) unless user
return if !user || !repo

repo.gsub!(/.git$/, "")
repo.delete_suffix!(".git")

[user, repo]
end
Expand Down