fix: Use _path_add for PATH entries appended at the end
profile.d/path and rc.d/rvm concatenated onto PATH directly, so re-sourcing them in the same shell (source ~/.bashrc, a resourced tmux pane, etc.) would duplicate entries. _path_add already guards against that and tests directory existence itself. profile.d/krew and profile.d/anyenv are left untouched: they prepend to PATH (to take priority over other entries), while _path_add always appends — converting them would silently change resolution order.
This commit is contained in:
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
# Customize PATH
|
# Customize PATH
|
||||||
if [ -d "${HOME}/.bin" ] ; then export PATH="${PATH}:${HOME}/.bin" ; fi
|
_path_add "${HOME}/.bin"
|
||||||
if [ -d "${HOME}/.local/bin" ] ; then export PATH="${PATH}:${HOME}/.local/bin" ; fi
|
_path_add "${HOME}/.local/bin"
|
||||||
|
|
||||||
if [ -d "${HOME}/bin" ] ; then export PATH="${PATH}:${HOME}/bin" ; fi
|
_path_add "${HOME}/bin"
|
||||||
if [ -d "${HOME}/scripts" ] ; then export PATH="${PATH}:${HOME}/scripts" ; fi
|
_path_add "${HOME}/scripts"
|
||||||
|
|||||||
@@ -5,4 +5,4 @@
|
|||||||
[[ -r "${HOME}/.rvm/scripts/completion" ]] && source "${HOME}/.rvm/scripts/completion"
|
[[ -r "${HOME}/.rvm/scripts/completion" ]] && source "${HOME}/.rvm/scripts/completion"
|
||||||
|
|
||||||
# Add RVM to PATH for scripting
|
# Add RVM to PATH for scripting
|
||||||
[[ -r "${HOME}/.rvm/bin" ]] && PATH="${PATH}:${HOME}/.rvm/bin"
|
[[ -r "${HOME}/.rvm/bin" ]] && _path_add "${HOME}/.rvm/bin"
|
||||||
|
|||||||
Reference in New Issue
Block a user