audit: Fix Regexp for stripping .git from repo URLs
- [For a formula named turbogit](https://github.com/Homebrew/homebrew-core/pull/55208), we didn't see any of the notability checks fail CI. - The repo name was getting truncated to `turb`, which didn't exist, so the audit didn't return anything for this check. - The Regexp to strip `.git` from the end of was not escaping the `.`, so it would match anything ending in `git`, not a literal `.git`.
This commit is contained in:
parent
b9b51421f4
commit
0cced8e7bd
@ -597,7 +597,7 @@ module Homebrew
|
|||||||
_, user, repo = *regex.match(formula.homepage) unless user
|
_, user, repo = *regex.match(formula.homepage) unless user
|
||||||
return if !user || !repo
|
return if !user || !repo
|
||||||
|
|
||||||
repo.gsub!(/.git$/, "")
|
repo.delete_suffix!(".git")
|
||||||
|
|
||||||
[user, repo]
|
[user, repo]
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user