FormulaInstaller: factor out readline workaround
This commit is contained in:
parent
8cb861c695
commit
f848a08344
@ -79,12 +79,7 @@ class FormulaInstaller
|
|||||||
end
|
end
|
||||||
|
|
||||||
unless ignore_deps
|
unless ignore_deps
|
||||||
# HACK: If readline is present in the dependency tree, it will clash
|
perform_readline_hack
|
||||||
# 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
|
|
||||||
|
|
||||||
check_requirements
|
check_requirements
|
||||||
install_dependencies
|
install_dependencies
|
||||||
end
|
end
|
||||||
@ -118,6 +113,14 @@ class FormulaInstaller
|
|||||||
opoo "Nothing was installed to #{f.prefix}" unless f.installed?
|
opoo "Nothing was installed to #{f.prefix}" unless f.installed?
|
||||||
end
|
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
|
def check_requirements
|
||||||
unsatisfied = ARGV.filter_for_dependencies do
|
unsatisfied = ARGV.filter_for_dependencies do
|
||||||
f.recursive_requirements do |dependent, req|
|
f.recursive_requirements do |dependent, req|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user