Created
December 9, 2020 17:12
-
-
Save dkdndes/017e7b535653b27b15d2c787433c8932 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# check if pyenv is available | |
# edit: fixed redirect issue in earlier version | |
if which pyenv >/dev/null 2>&1; then | |
# assumes default location of brew in `/usr/local/bin/brew` | |
/usr/bin/env PATH="${PATH//$(pyenv root)\/shims:/}" /usr/local/bin/brew "$@" | |
else | |
/usr/local/bin/brew "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let
pyenv
play nice with HomebrewIf you run brew doctor, it might have some complaints.
$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: "config" scripts exist outside your system or Homebrew directories.
./configure
scripts often look for *-config scripts to determine ifsoftware packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
If you do not solve this, any Python dependent package from Homebrew might be compiled against a Python version managed by pyenv. See the second trick to create a wrapper script to solve these issues.
Trick #2: A wrapper for
brew