kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
358 stars 24 forks source link

gobrew can't download package with only major version #156

Closed chetratep closed 8 months ago

chetratep commented 8 months ago

➜ .gobrew gobrew version [INFO] gobrew version is 1.9.7 ➜ .gobrew gobrew install 1.21 ==> [Info] Downloading version: 1.21 ==> [Info] Downloading from: https://go.dev/dl/go1.21.darwin-arm64.tar.gz ==> [Info] Downloading to: /Users/chetra.tep/.gobrew/downloads ==> [Info] Downloading version failed: https://go.dev/dl/go1.21.darwin-arm64.tar.gz returned status code 404 ==> [Error]: Please check connectivity to url: https://go.dev/dl/go1.21.darwin-arm64.tar.gz

Incorrect download url https://go.dev/dl/go1.21.darwin-arm64.tar.gz https://go.dev/dl/ doesn't provide package with major version only. Only full version is available. eg. 1.21.0 => work , 1.21 => download 404 error

kevincobain2000 commented 8 months ago

Thanks. Will fix it today.

kevincobain2000 commented 8 months ago

That's because version 1.21 doesn't exist

From Go version 1.21 onwards, the versions are 1.21.0 and so on..

Having said that, I think we can automatically download 1.21.0 when 1.21 is provided

Similar issues https://github.com/kevincobain2000/gobrew/pull/24

kevincobain2000 commented 8 months ago

Pull req: https://github.com/kevincobain2000/gobrew/pull/157