gvm icon indicating copy to clipboard operation
gvm copied to clipboard

gvm cd fails with Unrecognized command line argument: ''

Open stackbaek opened this issue 1 year ago • 3 comments

When .go-version file contains go version without go (e.g. 1.22, instead of go1.22), cd-ing into this directory prints error

Unrecognized command line argument: ''

We should consider allowing version without the prefix go in the regex https://github.com/moovweb/gvm/blob/dd652539fa4b771840846f8319fad303c7d0a8d2/scripts/env/cd#L184

stackbaek avatar Apr 29 '24 17:04 stackbaek

same error here, pls consider adding an ignore rule to workaround .go-version file not in expected format

zhaodiaoer avatar Nov 21 '24 07:11 zhaodiaoer

Having the same issue here

ericywl avatar Jan 23 '25 03:01 ericywl

I've run into this as well and was going to draft up a PR for a replacement regex, but I'm not sure what requirements we want to support for versioning. I'd be happy to make it match the same without requiring the "go" substring.

For now, I have just started modifying my .go-version files.
That broke other things, I'll maintain my own regex for now.

Kevlar avatar May 29 '25 16:05 Kevlar