1
0
Fork 0
mirror of https://github.com/hcartiaux/dotfiles.git synced 2024-10-18 09:15:24 +02:00

[direnv,pyenv] Fix

This commit is contained in:
Hyacinthe Cartiaux 2021-11-11 11:59:09 +01:00
parent 19468dc3db
commit 12662f4120
2 changed files with 2 additions and 0 deletions

View file

@ -46,6 +46,7 @@
use_python() { use_python() {
if has pyenv; then if has pyenv; then
local pyversion=$1 local pyversion=$1
eval "$(pyenv init --path)"
eval "$(pyenv init -)" eval "$(pyenv init -)"
pyenv local ${pyversion} || log_error "Could not find pyenv version '${pyversion}'. Consider running 'pyenv install ${pyversion}'" pyenv local ${pyversion} || log_error "Could not find pyenv version '${pyversion}'. Consider running 'pyenv install ${pyversion}'"
fi fi

View file

@ -3,6 +3,7 @@
# - pyenv-virtualenv: https://github.com/pyenv/pyenv-virtualenv # - pyenv-virtualenv: https://github.com/pyenv/pyenv-virtualenv
if [ -n "$(which pyenv 2>/dev/null)" ]; then if [ -n "$(which pyenv 2>/dev/null)" ]; then
eval "$(pyenv init --path)"
eval "$(pyenv init -)" eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)" eval "$(pyenv virtualenv-init -)"