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

It's not clear what version we are running gobrew with #161

Closed juev closed 7 months ago

juev commented 7 months ago

We have the build running: https://github.com/kevincobain2000/gobrew/actions/runs/7111943967/job/19360930770

During which you can see that version 1.9.9 is being installed, after which it is used to install the dev-latest version: 1.21.5.

But when the go version is launched, version 1.20.11 is returned to us.

Where did this version come from? I don't have an understanding yet.

As a result, we get an error during the build.

kevincobain2000 commented 7 months ago

seems like - windows only issue

juev commented 7 months ago

Yes, this is specific to windows only. And version 1.20.11 is the default version on Windows servers. https://github.com/juev/gobrew-windows/actions/runs/7124279050/job/19398244415

It looks like the environment variables are not set correctly for windows: https://github.com/kevincobain2000/action-gobrew/blob/master/action.yml

juev commented 7 months ago

The problem was that in our workflow there was an indication to run run without explicitly specifying shell. As a result, we ran the gobrew installation in bash. But we checked the go version in a different interpreter. If you explicitly specify to run from bash, everything works fine. I made changes to MR, correcting our workflow. You will need to think about how to do this for all shells. And if this is not possible, indicate the specifics for Windows in the documentation.

juev commented 7 months ago

Will we add this case to the documentation? To draw attention to the problem? Or should we just close the current problem?

kevincobain2000 commented 7 months ago

It's ok to not add it to the docs. Someone from windows if wants can dig this issue up and fix it.

juev commented 7 months ago

Ok, thanks!