diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index a17f114f83..86444883a9 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -16,7 +16,7 @@ class Formula include Utils::Inreplace extend BuildEnvironmentDSL - attr_reader :name, :path, :homepage, :downloader, :build + attr_reader :name, :path, :homepage, :build attr_reader :stable, :bottle, :devel, :head, :active_spec # The current working directory during builds and tests. @@ -53,7 +53,6 @@ class Formula @active_spec = determine_active_spec validate_attributes :url, :name, :version - @downloader = active_spec.downloader @build = determine_build_options @pin = FormulaPin.new(self) @@ -120,6 +119,10 @@ class Formula active_spec.requirements end + def downloader + active_spec.downloader + end + # if the dir is there, but it's empty we consider it not installed def installed? (dir = installed_prefix).directory? && dir.children.length > 0