diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index e94746c0..93fcf499 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -141,8 +141,9 @@ can_use_homebrew() { 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}")"/* ]] && + # in Bash 3.2, var="$(cmd)" errexits on failure even if part of a conditional chain + brew_prefix="$(brew --prefix || true)" && [[ -n "$brew_prefix" ]] && \ + [[ $(abs_dirname "${BASH_SOURCE}") == "$(abs_dirname "${brew_prefix}")"/* ]] && \ { lock_in homebrew; return 0; } # do not check the same stuff multiple times diff --git a/plugins/python-build/test/build.bats b/plugins/python-build/test/build.bats index 953816cc..0f2aab0e 100644 --- a/plugins/python-build/test/build.bats +++ b/plugins/python-build/test/build.bats @@ -70,6 +70,9 @@ assert_build_log() { install_fixture definitions/needs-yaml assert_success + unstub uname + unstub make + assert_build_log <