aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/doublecpp.rb
diff options
context:
space:
mode:
authorJack Nagel2013-09-30 21:36:38 -0500
committerJack Nagel2013-09-30 22:56:02 -0500
commitf1a5f559e3664566f4818c7f41d5055402eb796c (patch)
tree3c437011763db194357f24333873f948c3b48215 /Library/Formula/doublecpp.rb
parent27a0a84e476f9bbb4cda06def9c5a222834fa376 (diff)
downloadhomebrew-f1a5f559e3664566f4818c7f41d5055402eb796c.tar.bz2
Handle invalid names in download strategies
When subformulae are initialized without a name parameter, Homebrew assigns the name "__UNKNOWN__". This may cause collisions in the cache. Currently CurlDownloadStrategy and its descendants handles this by extracting the basename form the URL and using that as the cached filename. However, other strategies simply raise an exception. We can improve the other strategies by URL-encoding the URL string and using that as the cached directory name. Note that this happens very rarely, especially now that resources (which always have a name) are preferred to subformulae. The most common case is a subformula that specifies a head download. Closes #22949.
Diffstat (limited to 'Library/Formula/doublecpp.rb')
0 files changed, 0 insertions, 0 deletions