diff options
| author | Jack Nagel | 2012-09-06 20:47:05 -0500 |
|---|---|---|
| committer | Jack Nagel | 2012-09-06 20:47:05 -0500 |
| commit | 192e6e052cd5e0ab47aa53e8b438640efedc3630 (patch) | |
| tree | 59277a64ccd42977171b936992544fbabc5a2d15 /Library/Homebrew/cmd | |
| parent | f5d0fbcce64800e56da8aeb565b985944a6536d0 (diff) | |
| download | brew-192e6e052cd5e0ab47aa53e8b438640efedc3630.tar.bz2 | |
audit: allow some forms of gist patches
The problem is not the raw URLs, but URLs that do not contain the commit
hash corresponding to a particular version of the gist.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 40060799a..32eec75c8 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -253,7 +253,9 @@ class FormulaAuditor Patches.new(f.patches).select { |p| p.external? }.each do |p| case p.url when %r[raw\.github\.com], %r[gist\.github\.com/raw] - problem "Using raw GitHub URLs is not recommended:\n#{p.url}" + unless p.url =~ /[a-fA-F0-9]{40}/ + problem "GitHub/Gist patches should specify a revision:\n#{p.url}" + end when %r[macports/trunk] problem "MacPorts patches should specify a revision instead of trunk:\n#{p.url}" end |
