diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 6f8667c8e5..aca76b492c 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|