mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
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
1 changed files with 0 additions and 13 deletions
|
@ -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…
Reference in a new issue