I should have used basename only to check shims

This commit is contained in:
Yamashita, Yuu 2017-07-21 00:55:11 +00:00
parent 753a9e826b
commit e9ad498fe3
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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}" <<SH
#!/usr/bin/env bash