Check paths exist before brew install warning
This commit is contained in:
parent
8f072dc05c
commit
a78da3ecf0
@ -86,10 +86,13 @@ module Homebrew
|
|||||||
else
|
else
|
||||||
expanded_paths = args.named.to_paths
|
expanded_paths = args.named.to_paths
|
||||||
expanded_paths.each do |path|
|
expanded_paths.each do |path|
|
||||||
if path.exist? &&
|
fail(path, args.cask?) unless path.exist?
|
||||||
(path.core_formula_path? || path.core_cask_path? || path.core_formula_tap? || path.core_cask_tap?) &&
|
end
|
||||||
!Homebrew::EnvConfig.no_install_from_api? &&
|
|
||||||
!Homebrew::EnvConfig.no_env_hints?
|
expanded_paths.each do |path|
|
||||||
|
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_env_hints?
|
||||||
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.core_cask_path? || path.core_cask_tap?) ? "casks" : "formulae"} if
|
||||||
`HOMEBREW_NO_INSTALL_FROM_API` is not set.
|
`HOMEBREW_NO_INSTALL_FROM_API` is not set.
|
||||||
@ -97,12 +100,7 @@ module Homebrew
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
expanded_paths
|
||||||
expanded_paths.each do |path|
|
|
||||||
if not path.exist?
|
|
||||||
fail(path, args.cask?)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if args.print_path?
|
if args.print_path?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user