asdf-community / asdf-golang

Go plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
552 stars 92 forks source link

Patch version is incorrectly parsed from `.go-version` #136

Open ofalvai opened 7 months ago

ofalvai commented 7 months ago

Describe the bug

I'm not sure if this is a bug in the plugin or ASDF itself, but I found a strange edge case:

To Reproduce Steps to reproduce the behavior:

  1. Set .go-version to 1.20.1
  2. asdf install golang 1.20.14: this is important, see below
  3. Run asdf current or a similar command
  4. ASDF selects 1.20.14

Expected behavior

Go version 1.20.1 should be selected. Instead, asdf current reports 1.20.14.

When I uninstall 1.20.14, the issue goes away. When I use .tool-versions instead of .go-version, it's also not present.

asdf version: v0.14.0-ccdd47d asdf-golang version: 652c5922640fcedb1cc0f869d960456d8dac10ec