Remove the "Using script's directory as PYENV_DIR if shim is invoked with a script argument" feature
It's impossible to 100% reliably extract the script argument from the command line for all and unknown Python versions and implementations
This commit is contained in:
parent
a6b0a2846e
commit
131e44afcb
@ -67,19 +67,6 @@ set -e
|
|||||||
[ -n "\$PYENV_DEBUG" ] && set -x
|
[ -n "\$PYENV_DEBUG" ] && set -x
|
||||||
|
|
||||||
program="\${0##*/}"
|
program="\${0##*/}"
|
||||||
if [[ "\$program" = "python"* ]]; then
|
|
||||||
for arg; do
|
|
||||||
case "\$arg" in
|
|
||||||
-c* | -- ) break ;;
|
|
||||||
*/* )
|
|
||||||
if [ -f "\$arg" ]; then
|
|
||||||
export PYENV_DIR="\${arg%/*}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PYENV_ROOT="$PYENV_ROOT"
|
export PYENV_ROOT="$PYENV_ROOT"
|
||||||
exec "$(command -v pyenv)" exec "\$program" "\$@"
|
exec "$(command -v pyenv)" exec "\$program" "\$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user