From 2e44ffe80f3c5ed357a22a6eb74d9fd5b9debda6 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 2 Jul 2014 21:24:01 -0500 Subject: [PATCH] Move require into method to avoid circular require There is a nasty circular dependency here: formula.rb requirement.rb extend/ENV.rb extend/ENV/shared.rb formula.rb Probably the information that the build environment needs from formula should be passed in at runtime, but that seems hard and I really just want to be able to run the tests with warnings turned on. :/ --- Library/Homebrew/requirement.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/requirement.rb b/Library/Homebrew/requirement.rb index ee9b127abe..e05f98a461 100644 --- a/Library/Homebrew/requirement.rb +++ b/Library/Homebrew/requirement.rb @@ -1,7 +1,6 @@ require 'dependable' require 'dependency' require 'build_environment' -require 'extend/ENV' # A base class for non-formula requirements needed by formulae. # A "fatal" requirement is one that will fail the build if it is not present. @@ -127,6 +126,7 @@ class Requirement if instance_variable_defined?(:@satisfied) @satisfied elsif @options[:build_env] + require "extend/ENV" ENV.with_build_environment { yield @proc } else yield @proc