Use any? to check for warning message and fix brew style
This commit is contained in:
parent
d16e7e1f32
commit
2445b687c6
@ -114,17 +114,15 @@ module Homebrew
|
|||||||
fail_with_message(path, args.cask?) unless path.exist?
|
fail_with_message(path, args.cask?) unless path.exist?
|
||||||
end
|
end
|
||||||
|
|
||||||
expanded_paths.each do |path|
|
if expanded_paths.any? do |path|
|
||||||
if (path.core_formula_path? || path.core_cask_path? || path.core_formula_tap? || path.core_cask_tap?) &&
|
(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"
|
end
|
||||||
opoo <<~EOS
|
opoo <<~EOS
|
||||||
`brew install` ignores locally edited #{path_type} if
|
`brew install` ignores locally edited casks and formulae if
|
||||||
HOMEBREW_NO_INSTALL_FROM_API is not set.
|
HOMEBREW_NO_INSTALL_FROM_API is not set.
|
||||||
EOS
|
EOS
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
expanded_paths
|
expanded_paths
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user