aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-06-08 15:14:01 -0500
committerJack Nagel2013-06-08 15:14:23 -0500
commitf848a0834487c27ce9608328ab8a4575d3d8fedb (patch)
treec976cf210f699358508a3ac7dca74998b78d8896 /Library
parent8cb861c6950bd72b0370391fade00ea60209e2b9 (diff)
downloadbrew-f848a0834487c27ce9608328ab8a4575d3d8fedb.tar.bz2
FormulaInstaller: factor out readline workaround
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 6f8667c8e..aca76b492 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -79,12 +79,7 @@ class FormulaInstaller
end
unless ignore_deps
- # HACK: If readline is present in the dependency tree, it will clash
- # with the stdlib's Readline module when the debugger is loaded
- if f.recursive_dependencies.any? { |d| d.name == "readline" } and ARGV.debug?
- ENV['HOMEBREW_NO_READLINE'] = '1'
- end
-
+ perform_readline_hack
check_requirements
install_dependencies
end
@@ -118,6 +113,14 @@ class FormulaInstaller
opoo "Nothing was installed to #{f.prefix}" unless f.installed?
end
+ # HACK: If readline is present in the dependency tree, it will clash
+ # with the stdlib's Readline module when the debugger is loaded
+ def perform_readline_hack
+ if f.recursive_dependencies.any? { |d| d.name == "readline" } && ARGV.debug?
+ ENV['HOMEBREW_NO_READLINE'] = '1'
+ end
+ end
+
def check_requirements
unsatisfied = ARGV.filter_for_dependencies do
f.recursive_requirements do |dependent, req|