Only check @specs for :using if @specs exists. Fixes Homebrew/homebrew#1127.

This commit is contained in:
Adam Vandenberg 2010-04-06 13:13:50 -07:00
parent 663ea030fc
commit d9fe4f00a4

View File

@ -134,6 +134,7 @@ class Formula
# reimplement if we don't autodetect the download strategy you require # reimplement if we don't autodetect the download strategy you require
def download_strategy def download_strategy
if @specs
vcs = @specs.delete :using vcs = @specs.delete :using
if vcs != nil if vcs != nil
# If a class is passed, assume it is a download strategy # If a class is passed, assume it is a download strategy
@ -150,6 +151,7 @@ class Formula
raise "Unknown strategy #{vcs} was requested." raise "Unknown strategy #{vcs} was requested."
end end
end
detect_download_strategy url detect_download_strategy url
end end