ensure_executable!: add opt_bin path to search
Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
parent
03bf6cc431
commit
0f0dee42b4
@ -401,6 +401,9 @@ module Kernel
|
|||||||
executable = [
|
executable = [
|
||||||
which(name),
|
which(name),
|
||||||
which(name, ORIGINAL_PATHS),
|
which(name, ORIGINAL_PATHS),
|
||||||
|
# We prefer the opt_bin path to a formula's executable over the prefix
|
||||||
|
# path where available, since the former is stable during upgrades.
|
||||||
|
HOMEBREW_PREFIX/"opt/#{formula_name}/bin/#{name}",
|
||||||
HOMEBREW_PREFIX/"bin/#{name}",
|
HOMEBREW_PREFIX/"bin/#{name}",
|
||||||
].compact.first
|
].compact.first
|
||||||
return executable if executable.exist?
|
return executable if executable.exist?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user