Files
config-bash/rc.d/asdf
T
xavier 5653b8caf0 fix(rc): Prevent double-sourcing asdf when both native and Nix installs exist
rc.d/asdf tested native (~/.asdf) and Nix-profile asdf independently,
so if both were present on a machine, asdf would be sourced twice —
duplicate PATH entries and redefined completions/functions. Make the
Nix branch an elif so at most one is sourced.
2026-08-22 00:55:59 +02:00

13 lines
321 B
Plaintext

if [ -f ~/.asdf/asdf.sh ]; then
# activate asdf
source ~/.asdf/asdf.sh
# activate completion
source ~/.asdf/completions/asdf.bash
elif [ -f "${HOME}/.nix-profile/share/asdf-vm/asdf.sh" ]; then
. "${HOME}/.nix-profile/share/asdf-vm/asdf.sh"
. "${HOME}/.nix-profile/share/bash-completion/completions/asdf.bash"
fi