Better message if multiple kegs need linking
This commit is contained in:
parent
9274f7cda1
commit
4e7bb6c637
@ -40,12 +40,13 @@ class FormulaInstaller
|
|||||||
raise CannotInstallFormulaError, "No head is defined for #{f.name}"
|
raise CannotInstallFormulaError, "No head is defined for #{f.name}"
|
||||||
end
|
end
|
||||||
|
|
||||||
f.recursive_deps.each do |dep|
|
unless ignore_deps
|
||||||
if dep.installed? and not dep.keg_only? and not dep.linked_keg.directory?
|
unlinked_deps = f.recursive_deps.select do |dep|
|
||||||
raise CannotInstallFormulaError,
|
dep.installed? and not dep.keg_only? and not dep.linked_keg.directory?
|
||||||
"You must `brew link #{dep}' before #{f} can be installed"
|
end
|
||||||
|
raise CannotInstallFormulaError,
|
||||||
|
"You must `brew link #{unlinked_deps*' '}' before #{f} can be installed" unless unlinked_deps.empty?
|
||||||
end
|
end
|
||||||
end unless ignore_deps
|
|
||||||
|
|
||||||
rescue FormulaUnavailableError => e
|
rescue FormulaUnavailableError => e
|
||||||
# this is sometimes wrong if the dependency chain is more than one deep
|
# this is sometimes wrong if the dependency chain is more than one deep
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user