refactoring as we can get dependants before installing

This commit is contained in:
thibhero 2025-06-17 19:21:17 -04:00
parent 8c203df671
commit 971a8b40e6

View File

@ -236,7 +236,6 @@ module Homebrew
verbose: args.verbose?,
)
if args.ask?
dependants = Upgrade.dependants(
formulae_to_install,
flags: args.flags_only,
@ -253,33 +252,16 @@ module Homebrew
verbose: args.verbose?,
)
if args.ask?
formulae_dependencies = Install.collect_dependencies(formulae_installer, dependants)
# Main block: if asking the user is enabled, show dependency and size information.
Install.ask_formulae(formulae_dependencies, args: args)
end
Upgrade.upgrade_formulae(formulae_installer,
dry_run: args.dry_run?,
verbose: args.verbose?)
unless args.ask?
dependants = Upgrade.dependants(
formulae_to_install,
flags: args.flags_only,
dry_run: args.dry_run?,
force_bottle: args.force_bottle?,
build_from_source_formulae: args.build_from_source_formulae,
interactive: args.interactive?,
keep_tmp: args.keep_tmp?,
debug_symbols: args.debug_symbols?,
force: args.force?,
debug: args.debug?,
quiet: args.quiet?,
verbose: args.verbose?,
)
end
if dependants.present?
Upgrade.upgrade_dependents(
dependants, formulae_to_install,