mirror of
https://github.com/tiyn/dotfiles.git
synced 2026-02-21 12:14:47 +01:00
profile: make pyenv fail safely withouth stopping graphical interface completely
This commit is contained in:
10
.profile
10
.profile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user