diff options
| author | Mike McQuaid | 2015-03-07 15:02:25 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2015-03-08 10:48:58 +0000 |
| commit | aa1edff84e19aa268d9c0a0259db77387a103e9e (patch) | |
| tree | 964c824a2c154f5c6b7d322039023e4fb7decbad /Library/Homebrew/cmd | |
| parent | 7497e4226b6222724852ee497d41d1f6ad76d6b8 (diff) | |
| download | homebrew-aa1edff84e19aa268d9c0a0259db77387a103e9e.tar.bz2 | |
audit: git tags should also specify revisions.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/audit.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 2354cb3c2..dd41d9284 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -872,6 +872,14 @@ class ResourceAuditor problem "Use of the #{$&} scheme is deprecated, pass `:using => :#{$1}` instead" end + url_strategy = DownloadStrategyDetector.detect(url) + + if using == :git || url_strategy == GitDownloadStrategy + if specs[:tag] && !specs[:revision] + problem "Git should specify :revision when a :tag is specified." + end + end + return unless using if using == :ssl3 || using == CurlSSL3DownloadStrategy @@ -898,7 +906,6 @@ class ResourceAuditor end end - url_strategy = DownloadStrategyDetector.detect(url) using_strategy = DownloadStrategyDetector.detect('', using) if url_strategy == using_strategy |
