When I run go commands at the root, it attempts to...
# atlantis-contributors
l
When I run go commands at the root, it attempts to download go 1.22 (presumably due to https://github.com/runatlantis/atlantis/pull/4217), but I get an error:
Copy code
go: download go1.22 for darwin/arm64: toolchain not available
I found https://github.com/golang/go/issues/65568 and followed a suggestion from that thread and made this change:
Copy code
atlantis % git diff
diff --git a/go.mod b/go.mod
index f37e696e..883d6822 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module <http://github.com/runatlantis/atlantis|github.com/runatlantis/atlantis>
 
-go 1.22
+go 1.22.0
 
 require (
        github
After that running go commands installed go1.22.0 and the go command started working again
I'm not super familiar with this part of the go toolchain, @Rui do you have any thoughts here?
happy to push up a PR for the
s/1.22/1.22.0
change if that's "correct"
r
I dont you need toolchain?
@Luke Massa can you print these two for me?
go version
which go
l
Copy code
atlantis % go version
go version go1.22.0 darwin/amd64
atlantis % which go
/usr/local/bin/go
that's actually after I edited go.mod locally
w/o editing I get:
Copy code
atlantis % go version
go: downloading go1.22 (darwin/amd64)
go: download go1.22 for darwin/amd64: toolchain not available
and outside of that directory I get:
Copy code
~ % go version
go version go1.21.6 darwin/amd64
~ % which go
/usr/local/bin/go
r
@Luke Massa I actually think the issue is because you are using go1.21, that is why you need to download the go1.22.0 toolchain, if you upgrade
/usr/local/bin/go
to go1.22, you wont see the same issue again.
either way this PR https://github.com/runatlantis/atlantis/pull/4287 would help with people who has go1.21 installed globally.
l
ah interesting. What was neat was that, even w go1.21.6 I was still able to use the go 1.22 tool chain to manage atlantis
I think it has to do with this: https://go.dev/blog/toolchain