diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 676e997d62..742b5e53a8 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -24,7 +24,6 @@ class Formula set_instance_variable 'bottle_sha1' set_instance_variable 'head' set_instance_variable 'specs' - set_instance_variable 'standard' set_instance_variable 'unstable' @@ -41,19 +40,21 @@ class Formula end raise "No url provided for formula #{name}" if @url.nil? - @name=name + @name = name validate_variable :name # If we got an explicit path, use that, else determine from the name @path = path.nil? ? self.class.path(name) : Pathname.new(path) + # Use a provided version, if any set_instance_variable 'version' + # Otherwise detect the version from the URL @version ||= @spec_to_use.detect_version - validate_variable :version if @version + validate_variable :version CHECKSUM_TYPES.each { |type| set_instance_variable type } - @downloader=download_strategy.new @spec_to_use.url, name, version, @spec_to_use.specs + @downloader = download_strategy.new @spec_to_use.url, name, version, @spec_to_use.specs end # if the dir is there, but it's empty we consider it not installed