Remove special handling of pyenv from homebrew
Installing pyenv's Python versions under `brew --prefix pyenv` will make the user have to re-install all Python versions everytime pyenv is updated. This is because `brew --prefix pyenv` by links to a Homebrew Cellar directory containing pyenv's version name.
This commit is contained in:
parent
1c958e02a5
commit
2ad9b3d977
@ -1,16 +1,5 @@
|
|||||||
_homebrew-installed() {
|
|
||||||
type brew &> /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
_pyenv-from-homebrew-installed() {
|
|
||||||
brew --prefix pyenv &> /dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
FOUND_PYENV=0
|
FOUND_PYENV=0
|
||||||
pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv")
|
pyenvdirs=("$HOME/.pyenv" "/usr/local/pyenv" "/opt/pyenv")
|
||||||
if _homebrew-installed && _pyenv-from-homebrew-installed ; then
|
|
||||||
pyenvdirs=($(brew --prefix pyenv) "${pyenvdirs[@]}")
|
|
||||||
fi
|
|
||||||
|
|
||||||
for pyenvdir in "${pyenvdirs[@]}" ; do
|
for pyenvdir in "${pyenvdirs[@]}" ; do
|
||||||
if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then
|
if [ -d $pyenvdir/bin -a $FOUND_PYENV -eq 0 ] ; then
|
||||||
|
Loading…
Reference in New Issue
Block a user