未验证 提交 fd1ca7e2 编辑于 作者: Carlo Cabrera's avatar Carlo Cabrera
浏览文件

Remove redundant conditionals

Whenever the `sysctl` call does not match `"Apple"*`, we can be sure
that `HOMEBREW_PROCESSOR` is `Intel`, so there's no need for this
additional check.
上级 51ab1649
......@@ -14,8 +14,7 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
"$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
if [[ "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
# Handle the case where /usr/local/bin/brew is run under arm64.
# It's a x86_64 installation there (we refuse to install arm64 binaries) so
# use a x86_64 Portable Ruby.
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册