correcting error of installation dependency

resolves #20181
This commit is contained in:
thibhero 2025-06-26 19:12:39 -04:00
parent 2d39c7feb5
commit 9e131d0794

View File

@ -313,6 +313,19 @@ module Homebrew
skip_post_install: false, skip_post_install: false,
skip_link: false skip_link: false
) )
unless dry_run
formula_installers.each do |fi|
fi.prelude
fi.fetch
rescue CannotInstallFormulaError => e
ofail e.message
next
rescue UnsatisfiedRequirements, DownloadError, ChecksumMismatchError => e
ofail "#{formula}: #{e}"
next
end
end
if dry_run if dry_run
if (formulae_name_to_install = formula_installers.map(&:name)) if (formulae_name_to_install = formula_installers.map(&:name))
ohai "Would install #{Utils.pluralize("formula", formulae_name_to_install.count, ohai "Would install #{Utils.pluralize("formula", formulae_name_to_install.count,
@ -327,18 +340,6 @@ module Homebrew
end end
formula_installers.each do |fi| formula_installers.each do |fi|
begin
unless dry_run
fi.prelude
fi.fetch
end
rescue CannotInstallFormulaError => e
ofail e.message
next
rescue UnsatisfiedRequirements, DownloadError, ChecksumMismatchError => e
ofail "#{formula}: #{e}"
next
end
install_formula(fi) install_formula(fi)
Cleanup.install_formula_clean!(fi.formula) Cleanup.install_formula_clean!(fi.formula)
end end