1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-02-21 04:04:48 +01:00

profile: make pyenv fail safely withouth stopping graphical interface completely

This commit is contained in:
2026-02-17 07:44:15 +01:00
parent 59f74aeadf
commit 9544ecdfac

View File

@@ -72,9 +72,15 @@ export VIPER_BOOGIE="$HOME/.dotnet/tools/boogie"
# python
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
if [ -d "$PYENV_ROOT" ] && [ -x "PYENV_ROOT/bin/pyenv" ]; then
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v timeout >/DEV/NULL 2>&1; then
timeout 2s -c sh -c 'eval "$($PYENV_ROOT/bin/pyenv init --path)"' 2>/dev/null
else
eval "$($PYENV_ROOT/bin/pyenv init --path 2>/dev/null)" || true
fi
fi
# less/man colors
export LESS=-R