install, upgrade: don't print message if formula already installed

This commit is contained in:
fn ⌃ ⌥ 2021-09-09 10:54:18 -07:00
parent 63fff991a2
commit eec60c4086
2 changed files with 4 additions and 4 deletions

View File

@ -289,6 +289,8 @@ module Homebrew
def install_formula(formula_installer, only_deps: false) def install_formula(formula_installer, only_deps: false)
f = formula_installer.formula f = formula_installer.formula
formula_installer.prelude
f.print_tap_action f.print_tap_action
if f.linked_keg.directory? if f.linked_keg.directory?
@ -316,8 +318,6 @@ module Homebrew
end end
end end
formula_installer.prelude
kegs.each(&:unlink) if kegs.present? kegs.each(&:unlink) if kegs.present?
formula_installer.install formula_installer.install

View File

@ -165,12 +165,12 @@ module Homebrew
if dry_run if dry_run
print_dry_run_dependencies(formula, formula_installer.compute_dependencies) print_dry_run_dependencies(formula, formula_installer.compute_dependencies)
return return
else
print_upgrade_message(formula, formula_installer.options)
end end
formula_installer.prelude formula_installer.prelude
print_upgrade_message(formula, formula_installer.options)
# first we unlink the currently active keg for this formula otherwise it is # first we unlink the currently active keg for this formula otherwise it is
# possible for the existing build to interfere with the build we are about to # possible for the existing build to interfere with the build we are about to
# do! Seriously, it happens! # do! Seriously, it happens!