浏览代码

Fix python-build `brew: command not found` error (#1544)

This PR fixes (currently harmless) warning on macOS when homebrew is *not* installed.

- [ ] Test case (required?)

For example:

```sh
wadkar$ pyenv install 3.8.2
/Users/wadkar/.pyenv/plugins/python-build/bin/python-build: line 1541: brew: command not found
/Users/wadkar/.pyenv/plugins/python-build/bin/python-build: line 1541: brew: command not found
Installing openssl-1.1.0j...
Installed openssl-1.1.0j to /Users/wadkar/.pyenv/versions/3.8.2

Installing readline-8.0...
Installed readline-8.0 to /Users/wadkar/.pyenv/versions/3.8.2

Installing Python-3.8.2...
python-build: use zlib from xcode sdk
Installed Python-3.8.2 to /Users/wadkar/.pyenv/versions/3.8.2
```
pull/1580/head
Sudarshan Wadkar 4 年前
提交者 GitHub
父节点
当前提交
b1381d1d46
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. +1
    -0
      plugins/python-build/bin/python-build

+ 1
- 0
plugins/python-build/bin/python-build 查看文件

@ -1537,6 +1537,7 @@ has_broken_mac_openssl() {
}
use_homebrew_openssl() {
command -v brew >/dev/null || return 1
for openssl in ${PYTHON_BUILD_HOMEBREW_OPENSSL_FORMULA:-openssl}; do
local ssldir="$(brew --prefix "${openssl}" || true)"
if [ -d "$ssldir" ]; then

正在加载...
取消
保存