Merge pull request #17106 from woodruffw-forks/ww/upgrade-fix-attestation
ensure_executable!: add opt_bin path to search
This commit is contained in:
commit
47c2c6deed
@ -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