Add missing negations

This commit is contained in:
Rylan Polster 2021-06-10 11:39:20 -04:00
parent 30be3e2340
commit e3cf41e3ab
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -118,7 +118,7 @@ module Homebrew
end end
prefix_installed = f.prefix.exist? && !f.prefix.children.empty? prefix_installed = f.prefix.exist? && !f.prefix.children.empty?
if f.keg_only? && f.any_version_installed? && f.optlinked? && force if f.keg_only? && f.any_version_installed? && f.optlinked? && !force
# keg-only install is only possible when no other version is # keg-only install is only possible when no other version is
# linked to opt, because installing without any warnings can break # linked to opt, because installing without any warnings can break
# dependencies. Therefore before performing other checks we need to be # dependencies. Therefore before performing other checks we need to be
@ -132,7 +132,7 @@ module Homebrew
EOS EOS
elsif only_dependencies elsif only_dependencies
return true return true
elsif quiet elsif !quiet
opoo <<~EOS opoo <<~EOS
#{f.full_name} #{f.pkg_version} is already installed and up-to-date. #{f.full_name} #{f.pkg_version} is already installed and up-to-date.
To reinstall #{f.pkg_version}, run: To reinstall #{f.pkg_version}, run:
@ -196,7 +196,7 @@ module Homebrew
"#{msg}." "#{msg}."
end end
opoo msg if msg opoo msg if msg
elsif f.migration_needed? && force elsif f.migration_needed? && !force
# Check if the formula we try to install is the same as installed # Check if the formula we try to install is the same as installed
# but not migrated one. If --force is passed then install anyway. # but not migrated one. If --force is passed then install anyway.
opoo <<~EOS opoo <<~EOS