fix: Use _path_prepend in profile.d/krew and profile.d/anyenv
Both prepended to PATH directly, so re-sourcing them in the same shell would duplicate entries — same issue _path_append already fixed for profile.d/path and rc.d/rvm. _path_prepend keeps the same priority ordering (these paths still take precedence over the rest of PATH) while adding the dedup guard.
This commit is contained in:
+1
-4
@@ -2,7 +2,4 @@
|
|||||||
|
|
||||||
# git clone https://github.com/riywo/anyenv ${HOME}/.anyenv
|
# git clone https://github.com/riywo/anyenv ${HOME}/.anyenv
|
||||||
|
|
||||||
if [ -d "${HOME}/.anyenv/bin" ]
|
_path_prepend "${HOME}/.anyenv/bin"
|
||||||
then
|
|
||||||
export PATH="${HOME}/.anyenv/bin:${PATH}"
|
|
||||||
fi
|
|
||||||
|
|||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
if (command -v krew &>/dev/null); then
|
if (command -v krew &>/dev/null); then
|
||||||
export PATH="${KREW_ROOT:-${HOME}/.krew}/bin:${PATH}"
|
_path_prepend "${KREW_ROOT:-${HOME}/.krew}/bin"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user