Merge pull request #2761 from sjackman/bottleloader-url-homebrew
BottleLoader: Fix installing a bottle from an URL
This commit is contained in:
commit
3b376bfa2f
@ -108,7 +108,8 @@ module Formulary
|
|||||||
case bottle_name
|
case bottle_name
|
||||||
when %r{(https?|ftp|file)://}
|
when %r{(https?|ftp|file)://}
|
||||||
# The name of the formula is found between the last slash and the last hyphen.
|
# The name of the formula is found between the last slash and the last hyphen.
|
||||||
resource = Resource.new bottle_name[%r{([^/]+)-}, 1] { url bottle_name }
|
formula_name = File.basename(bottle_name)[/(.+)-/, 1]
|
||||||
|
resource = Resource.new(formula_name) { url bottle_name }
|
||||||
downloader = CurlBottleDownloadStrategy.new resource.name, resource
|
downloader = CurlBottleDownloadStrategy.new resource.name, resource
|
||||||
@bottle_filename = downloader.cached_location
|
@bottle_filename = downloader.cached_location
|
||||||
cached = @bottle_filename.exist?
|
cached = @bottle_filename.exist?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user