check_PATH: return early if (s)bin doesn't exist.
This commit is contained in:
parent
16b69317fe
commit
f526bd5017
@ -4,10 +4,13 @@ module FormulaCellarChecks
|
|||||||
return unless bin.directory?
|
return unless bin.directory?
|
||||||
return unless bin.children.length > 0
|
return unless bin.children.length > 0
|
||||||
|
|
||||||
bin = (HOMEBREW_PREFIX/bin.basename).realpath
|
prefix_bin = (HOMEBREW_PREFIX/bin.basename)
|
||||||
return if ORIGINAL_PATHS.include? bin
|
return unless prefix_bin.directory?
|
||||||
|
|
||||||
["#{bin} is not in your PATH",
|
prefix_bin = prefix_bin.realpath
|
||||||
|
return if ORIGINAL_PATHS.include? prefix_bin
|
||||||
|
|
||||||
|
["#{prefix_bin} is not in your PATH",
|
||||||
"You can amend this by altering your ~/.bashrc file"]
|
"You can amend this by altering your ~/.bashrc file"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user