Add workaround for conflict of rehash
hook between pyenv-virtualenv
This commit is contained in:
parent
e93ae00ca1
commit
ac07d63780
@ -53,6 +53,18 @@ conda_shim() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# override `make_shims` to avoid conflict between pyenv-virtualenv's `envs.bash`
|
||||||
|
# https://github.com/yyuu/pyenv-virtualenv/blob/v20160716/etc/pyenv.d/rehash/envs.bash
|
||||||
|
make_shims() {
|
||||||
|
local file shim
|
||||||
|
for file do
|
||||||
|
shim="${file##*/}"
|
||||||
|
if ! conda_shim "${shim}" 1>&2; then
|
||||||
|
register_shim "$shim"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
deregister_conda_shims() {
|
deregister_conda_shims() {
|
||||||
local shim
|
local shim
|
||||||
local shims=()
|
local shims=()
|
||||||
@ -61,7 +73,7 @@ deregister_conda_shims() {
|
|||||||
shims[${#shims[*]}]="${shim}"
|
shims[${#shims[*]}]="${shim}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
registered_shims="${shims[@]}"
|
registered_shims=" ${shims[@]} "
|
||||||
}
|
}
|
||||||
|
|
||||||
if conda_exists; then
|
if conda_exists; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user