Skip to content
Discussion options

You must be logged in to vote

It is possible to add specific envvars into a launched program's environment (and run other arbitrary code before exec'ing into it) with a plugin that runs a hook at pyenv exec.

E.g., to run code in $(pyenv root)/<environment>.env if it exists:

$(pyenv root)/plugins/pyenv-env/etc/pyenv.d/exec/set-env.bash :

if [[ -e $PYENV_ROOT/$PYENV_VERSION.env ]]; then
  source "$PYENV_ROOT/$PYENV_VERSION.env"
fi

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stevecj
Comment options

Answer selected by stevecj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants