Apply suggestions from code review

Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Boris Klimenko 2020-02-26 15:56:45 +03:00 committed by GitHub
parent 22375bae7c
commit 4bde62b651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -185,12 +185,13 @@ module Homebrew
end end
fi.prelude fi.prelude
if f.optlinked? upgrade_version = if f.optlinked?
oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{Keg.new(f.opt_prefix).version} ->"\ "#{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}"
" #{f.pkg_version} #{fi.options.to_a.join " "}" " #{f.pkg_version} #{fi.options.to_a.join " "}"
else else
oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} -> #{f.pkg_version} #{fi.options.to_a.join " "}" "-> #{f.pkg_version}"
end end
oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{upgrade_version} #{fi.options.to_a.join(" ")}"
# 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