diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index 3578ba93fa5cbde7a1ec1df9a6fe589552e05705..88e75de3881598450241ef9e10d82acbcf1873a0 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -102,10 +102,11 @@ class FormulaCreator puts "You'll need to add an explicit 'version' to the formula." end + # XXX: why is "and version" here? unless ARGV.include? "--no-fetch" and version - spec = SoftwareSpec.new(url, version) - strategy = spec.download_strategy - @sha1 = strategy.new(name, spec).fetch.sha1 if strategy == CurlDownloadStrategy + r = Resource.new(:default, url, version) + r.owner = self + @sha1 = r.fetch.sha1 if r.download_strategy == CurlDownloadStrategy end path.write ERB.new(template, nil, '>').result(binding)