upgrade: deduplicate cask caveats.

Cask::Installer.caveats invokes Homebrew.messages.record_caveats
so only invoke it once and store the return value.
This commit is contained in:
FnControlOption 2021-09-02 08:23:07 -07:00
parent 034d4ac82b
commit 278c06f31d

View File

@ -203,7 +203,9 @@ module Cask
# Start new cask's installation steps
new_cask_installer.check_conflicts
puts new_cask_installer.caveats if new_cask_installer.caveats
if (caveats = new_cask_installer.caveats)
puts caveats
end
new_cask_installer.fetch