From f24e250f77a90d3c5ef4a62556cf32ddd367c381 Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Sat, 22 Aug 2026 02:10:52 +0200 Subject: [PATCH] fix: Use _path_prepend in profile.d/krew and profile.d/anyenv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- profile.d/anyenv | 5 +---- profile.d/krew | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/profile.d/anyenv b/profile.d/anyenv index 4d9808a..2798166 100644 --- a/profile.d/anyenv +++ b/profile.d/anyenv @@ -2,7 +2,4 @@ # git clone https://github.com/riywo/anyenv ${HOME}/.anyenv -if [ -d "${HOME}/.anyenv/bin" ] -then - export PATH="${HOME}/.anyenv/bin:${PATH}" -fi +_path_prepend "${HOME}/.anyenv/bin" diff --git a/profile.d/krew b/profile.d/krew index 3497bbf..e570dfb 100644 --- a/profile.d/krew +++ b/profile.d/krew @@ -1,3 +1,3 @@ if (command -v krew &>/dev/null); then - export PATH="${KREW_ROOT:-${HOME}/.krew}/bin:${PATH}" + _path_prepend "${KREW_ROOT:-${HOME}/.krew}/bin" fi