Asdf: `asdf where python` fails to return path when multiple python versions are globally active

Created on 1 Apr 2020  Â·  4Comments  Â·  Source: asdf-vm/asdf

Steps to reproduce

  1. Set a global py2 and py3 version: asdf global python 3.8.0 2.7.16
  2. Verify that this has been applied, reshim if necessary:
  3. which python-> ~/.asdf/shims/python
  4. which python2 -> ~/.asdf/shims/python2
  5. which python3-> ~/.asdf/shims/python3
  6. asdf current -> python 3.8.0 2.7.16 (set by ~/.tool-versions)
  7. Attempt to get current python path:
  8. asdf where python
  9. asdf where python2
  10. asdf where python3

Expected behavior

  • asdf where python -> ~/.asdf/shims/python
  • asdf where python2 -> ~/.asdf/shims/python2
  • asdf where python3 -> ~/.asdf/shims/python3

Actual behavior

  • asdf where python -> Version not installed
  • asdf where python2 -> No such plugin: python2
  • asdf where python3 -> No such plugin: python3

Note: This seems similar to issue #349 which is marked (correctly) as fixed

Environment

OS: PopOS 19.10 / Linux 5.3.0-7642-generic #34~1584408018~19.10~21df4b1-Ubuntu

asdf version: v0.7.8-4a3e3d6

bug

Most helpful comment

Hopefully, #790 should fix this.

All 4 comments

asdf where only works with plugin names. The name of your plugin is python. Just as in the asdf global python 3.8.0 2.7.16 command you ran.

If you want a command that returns the path to the executable use asdf which python3. If you want the path to the shim just use which python3.

asdf where python => Version not installed is the only bug I see here. But it is definitely a bug.

Yeah I thought that may be the case due to the plugin name being simply 'python'. Thanks for the explanation and review.

I came here to file an issue but see this behavior has already been recorded as a bug:

===================
# ~/.tool-versions
python 3.7.9
===================

➤ asdf where python
/Users/foo/.asdf/installs/python/3.7.9

===================
# ~/.tool-versions
python 3.7.9 3.8.5
===================

➤ asdf where python
Version not installed

Any chance this could be added to the v0.8.0 milestone? 😅

Hopefully, #790 should fix this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ypid picture ypid  Â·  3Comments

rhiroyuki picture rhiroyuki  Â·  3Comments

johnjelinek picture johnjelinek  Â·  3Comments

Antiarchitect picture Antiarchitect  Â·  3Comments

jamesstidard picture jamesstidard  Â·  4Comments