fix: Correction gestion direnv lorsqu'il n'est pas installé via asdf

This commit is contained in:
Xavier Logerais 2024-06-21 16:47:07 +00:00
parent 2140f57862
commit 640df9986c

View File

@ -1,24 +1,16 @@
#!/bin/bash #!/bin/bash
if ( which asdf &> /dev/null ) if (asdf which direnv &>/dev/null); then
then # Hook direnv into your shell.
eval "$(asdf exec direnv hook bash)"
if ( asdf which direnv &> /dev/null ) # A shortcut for asdf managed direnv.
then direnv() { asdf exec direnv "$@"; }
# Hook direnv into your shell. return
eval "$(asdf exec direnv hook bash)"
# A shortcut for asdf managed direnv. elif (command -v direnv &>/dev/null); then
direnv() { asdf exec direnv "$@"; } # Hook direnv into your shell.
eval "$(direnv hook bash)"
return
fi
elif ( which direnv &> /dev/null )
then
# Hook direnv into your shell.
eval "$(direnv hook bash)"
fi fi