From e9ad498fe39ed5575938161b56e2c7e2ba880c28 Mon Sep 17 00:00:00 2001 From: "Yamashita, Yuu" Date: Fri, 21 Jul 2017 00:55:11 +0000 Subject: [PATCH] I should have used basename only to check shims --- pyenv.d/rehash/conda.bash | 2 +- pyenv.d/rehash/source.bash | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyenv.d/rehash/conda.bash b/pyenv.d/rehash/conda.bash index 6febe61b..a45a9966 100644 --- a/pyenv.d/rehash/conda.bash +++ b/pyenv.d/rehash/conda.bash @@ -19,7 +19,7 @@ for shim in $(cat "${BASH_SOURCE%/*}/conda.d/"*".list" | sort | uniq | sed -e 's fi done shopt -u nullglob -eval "conda_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}" +eval "conda_shim(){ case \"\${1##*/}\" in ${shims[@]} *)return 1;;esac;}" # override `make_shims` to avoid conflict between pyenv-virtualenv's `envs.bash` # https://github.com/pyenv/pyenv-virtualenv/blob/v20160716/etc/pyenv.d/rehash/envs.bash diff --git a/pyenv.d/rehash/source.bash b/pyenv.d/rehash/source.bash index f9e02ee3..3b329491 100644 --- a/pyenv.d/rehash/source.bash +++ b/pyenv.d/rehash/source.bash @@ -8,7 +8,7 @@ for shim in $(cat "${BASH_SOURCE%/*}/source.d/"*".list" | sort | uniq | sed -e ' fi done shopt -u nullglob -eval "source_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}" +eval "source_shim(){ case \"\${1##*/}\" in ${shims[@]} *)return 1;;esac;}" cat > "${PROTOTYPE_SOURCE_SHIM_PATH}" <