Skip to content

Commit

Permalink
cmd/ebitenmobile: bug fix: need toolchain for the temporary go.mod
Browse files Browse the repository at this point in the history
hajimehoshi committed Sep 13, 2024
1 parent dd19552 commit f63a757
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/ebitenmobile/gomobile.go
Original file line number Diff line number Diff line change
@@ -161,6 +161,12 @@ import (
return tmp, err
}
}
// runtime.Version() is the current executing Go version. For example, this is the version of the toolchain directive in go.mod.
// This might differ from the Go command version under the temporary directory.
// To avoid the version mismatch, set the toolchain explicitly (#3086).
if err := runGo("mod", "edit", "-toolchain="+runtime.Version()); err != nil {
return tmp, err
}
if err := runGo("mod", "tidy"); err != nil {
return tmp, err
}

0 comments on commit f63a757

Please sign in to comment.