Move condition in interpolated part into variable

This commit is contained in:
Anatoli Babenia 2023-09-25 18:11:27 +03:00
parent e3c0dafbc4
commit 6c7f3eb233

View File

@ -118,8 +118,9 @@ module Homebrew
if (path.core_formula_path? || path.core_cask_path? || path.core_formula_tap? || path.core_cask_tap?) && if (path.core_formula_path? || path.core_cask_path? || path.core_formula_tap? || path.core_cask_tap?) &&
!Homebrew::EnvConfig.no_install_from_api? && !Homebrew::EnvConfig.no_install_from_api? &&
!Homebrew::EnvConfig.no_env_hints? !Homebrew::EnvConfig.no_env_hints?
path_type = (path.core_cask_path? || path.core_cask_tap?) ? "casks" : "formulae"
opoo <<~EOS opoo <<~EOS
`brew install` ignores locally edited #{(path.core_cask_path? || path.core_cask_tap?) ? "casks" : "formulae"} if `brew install` ignores locally edited #{path_type} if
HOMEBREW_NO_INSTALL_FROM_API is not set. HOMEBREW_NO_INSTALL_FROM_API is not set.
EOS EOS
break break