Просмотр исходного кода

Revert "shims: handle symlinked scripts, via new PYENV_FILE_ARG"

This reverts commit 493f036928.

# Conflicts:
#	libexec/pyenv
pull/1814/head
Ivan Pozdeev 5 лет назад
Родитель
Сommit
a6b0a2846e
2 измененных файлов: 1 добавлений и 19 удалений
  1. +0
    -18
      libexec/pyenv
  2. +1
    -1
      libexec/pyenv-rehash

+ 0
- 18
libexec/pyenv Просмотреть файл

@ -61,24 +61,6 @@ else
fi fi
export PYENV_ROOT export PYENV_ROOT
# Transfer PYENV_FILE_ARG (from shims) into PYENV_DIR.
if [ -z "${PYENV_DIR}" ]; then
if [ -n "${PYENV_FILE_ARG}" ]; then
if [ -L "${PYENV_FILE_ARG}" ]; then
PYENV_DIR="$(abs_dirname "${PYENV_FILE_ARG}")"
else
PYENV_DIR="${PYENV_FILE_ARG%/*}"
fi
export PYENV_DIR
unset PYENV_FILE_ARG
fi
else
[[ $PYENV_DIR == /* ]] || PYENV_DIR="$PWD/$PYENV_DIR"
cd "$PYENV_DIR" 2>/dev/null || abort "cannot change working directory to \`$PYENV_DIR'"
PYENV_DIR="$PWD"
cd "$OLDPWD"
fi
if [ -z "${PYENV_DIR}" ]; then if [ -z "${PYENV_DIR}" ]; then
PYENV_DIR="$PWD" PYENV_DIR="$PWD"
fi fi

+ 1
- 1
libexec/pyenv-rehash Просмотреть файл

@ -73,7 +73,7 @@ if [[ "\$program" = "python"* ]]; then
-c* | -- ) break ;; -c* | -- ) break ;;
*/* ) */* )
if [ -f "\$arg" ]; then if [ -f "\$arg" ]; then
export PYENV_FILE_ARG="\$arg"
export PYENV_DIR="\${arg%/*}"
break break
fi fi
;; ;;

Загрузка…
Отмена
Сохранить