From 5653b8caf0f7ae46044d48e24a5233abb098f90b Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Sat, 22 Aug 2026 00:47:49 +0200 Subject: [PATCH] fix(rc): Prevent double-sourcing asdf when both native and Nix installs exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- rc.d/asdf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rc.d/asdf b/rc.d/asdf index e290032..74dcf54 100644 --- a/rc.d/asdf +++ b/rc.d/asdf @@ -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