aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/audit.rb
diff options
context:
space:
mode:
authorJack Nagel2014-12-18 18:04:22 -0500
committerJack Nagel2014-12-19 12:28:18 -0500
commit0344d243e4b7279490d9be806ee440fcdcb102b3 (patch)
tree3f1b14bb6eaab3b89f935289347d9412eaf4f56f /Library/Homebrew/cmd/audit.rb
parentfff4b83a52afa32cac83981bc7ccc06658621b9c (diff)
downloadbrew-0344d243e4b7279490d9be806ee440fcdcb102b3.tar.bz2
Deprecate made-up URL schemes
This deprecates URLs that begin with the following fake URL schemes: bzr:// cvs:// hg:// fossil:// svn+http:// Despite their appearance, they are not actually accepted by the corresponding tools. They exist only as hints to the download strategy detection code, and are stripped from the URL before the URL is handed off to the VCS program. This is not documented, and may lead one to believe it is a valid URL that can be used elsewhere, when it actually only works inside Homebrew. We have a better mechanism for specifying the download strategy that is straightforward and explicit: :using => :hg Recommend that instead. Closes Homebrew/homebrew#35114.
Diffstat (limited to 'Library/Homebrew/cmd/audit.rb')
-rw-r--r--Library/Homebrew/cmd/audit.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 82e53a35a..e77e14cfe 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -623,6 +623,10 @@ class ResourceAuditor
end
def audit_download_strategy
+ if url =~ %r[^(cvs|bzr|hg|fossil)://] || url =~ %r[^(svn)\+http://]
+ problem "Use of the #{$&} scheme is deprecated, pass `:using => :#{$1}` instead"
+ end
+
return unless using
if using == :ssl3 || using == CurlSSL3DownloadStrategy