From 314937d5993a58f5a2c0dc970127ea9943af3ec5 Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Fri, 10 Jan 2014 09:07:49 +0900 Subject: [PATCH] Set `PYENV_BIN_PATH` in `PATH` even if the version is `system` (fixes #98) --- libexec/pyenv-exec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexec/pyenv-exec b/libexec/pyenv-exec index eb1500af..728e8f69 100755 --- a/libexec/pyenv-exec +++ b/libexec/pyenv-exec @@ -41,7 +41,7 @@ for script in "${scripts[@]}"; do done shift 1 -if [ "$PYENV_VERSION" != "system" ]; then - export PATH="${PYENV_BIN_PATH}:${PATH}" -fi +# CPython's `sys.executable` requires the `PYENV_BIN_PATH` to be at the top of the `PATH`. +# https://github.com/yyuu/pyenv/issues/98 +export PATH="${PYENV_BIN_PATH}:${PATH}" exec -a "$PYENV_COMMAND" "$PYENV_COMMAND_PATH" "$@"