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.
13 lines
321 B
Plaintext
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
|