asdf-vm / asdf-vm/asdf

bug: allow system version to come before asdf versions

Open
#1,167 8 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
25.6k
Forks
941
Avg merge
9h 24m
Merged PRs (30d)
3

Description

### Describe the Bug

I install the current Python from python.org but use asdf for managing older versions for integration testing. If I do `asdf global python system 3.8.12 3.7.12 3.6.15` and then `python3.6`, it says `No python3.6 executable found for python system`. If I put asdf's versions first it has no trouble.

### Steps to Reproduce

Install asdf, install some pythons, `asdf global python system `, use ``'s version, see error above.

### Expected Behaviour

I'd want to have `python3.6` `python3.7` `python3.8` et. al. on my path without obscuring system versions.

### Actual Behaviour

Error message as above.

### Environment

```shell
OS:
Darwin arabella.local 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan 5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000 arm64

SHELL:
zsh 5.8 (x86_64-apple-darwin21.0)

ASDF VERSION:
v0.9.0

ASDF ENVIRONMENT VARIABLES:
ASDF_DIR=/opt/homebrew/opt/asdf/libexec

ASDF INSTALLED PLUGINS:
python https://github.com/danhper/asdf-python.git master 57a4d72
```

### asdf plugins affected (if relevant)

python

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `asdf global python system 3.8.12 3.7.12 3.6.15` followed by `python3.6` in the reported Darwin/zsh environment. Trace the CLI's version resolution and shim behavior for the Python plugin, then verify that system Python executables remain discoverable while the listed asdf versions are still available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, zsh
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.