Merge pull request #12015 from FnControlOption/issue-11900

install, upgrade: don't print message if formula already installed
This commit is contained in:
Mike McQuaid 2021-09-10 13:00:26 +01:00 committed by GitHub
commit 1aae34d82d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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!