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.
This commit is contained in:
2026-08-22 00:55:59 +02:00
parent d94d9177d3
commit 5653b8caf0
+1 -3
View File
@@ -6,9 +6,7 @@ if [ -f ~/.asdf/asdf.sh ]; then
# activate completion
source ~/.asdf/completions/asdf.bash
fi
if [ -f "${HOME}/.nix-profile/share/asdf-vm/asdf.sh" ]; then
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