asdf-community / asdf-direnv

direnv plugin for the asdf version manager
https://github.com/asdf-vm/asdf
Apache License 2.0
559 stars 38 forks source link

bug: wrong with upstream code #159

Closed nella17 closed 1 year ago

nella17 commented 2 years ago
$ asdf direnv shell python latest
direnv: using asdf python latest
/Users/nella17/.asdf/plugins/direnv/lib/commands/../tools-environment-lib.bash:274: version_info[1]: unbound variable

Bugs from here.

https://github.com/asdf-community/asdf-direnv/blob/62c2708ae8faedc4df564b7242fa4eff0f20b0b7/lib/tools-environment-lib.bash#L269-L277

It should check ${version_info[1]}" is null or not.

https://github.com/asdf-vm/asdf/blob/5334d1db3d390c46ed49101528f74483eb6b2987/lib/functions/versions.bash#L40-L48