support test brew
stub
This commit is contained in:
parent
081325a481
commit
83ce1df72d
@ -134,7 +134,11 @@ can_use_homebrew() {
|
|||||||
is_mac && command -v brew &>/dev/null && return 0
|
is_mac && command -v brew &>/dev/null && return 0
|
||||||
# In Linux, if Pyenv itself is installed with Homebrew,
|
# In Linux, if Pyenv itself is installed with Homebrew,
|
||||||
# we assume the user wants to take dependencies from there as well by default
|
# we assume the user wants to take dependencies from there as well by default
|
||||||
command -v brew &>/dev/null && [[ $(abs_dirname "${BASH_SOURCE}") == "$(abs_dirname "$(brew --prefix)")"/* ]] &&
|
local brew_prefix
|
||||||
|
command -v brew &>/dev/null && \
|
||||||
|
# tests can have non-functional `brew' stub aliased to `false'
|
||||||
|
brew_prefix="$(brew --prefix)" &&
|
||||||
|
[[ $(abs_dirname "${BASH_SOURCE}") == "$(abs_dirname "${brew_prefix}")"/* ]] &&
|
||||||
{ lock_in homebrew; return 0; }
|
{ lock_in homebrew; return 0; }
|
||||||
|
|
||||||
# do not check the same stuff multiple times
|
# do not check the same stuff multiple times
|
||||||
|
Loading…
x
Reference in New Issue
Block a user