Skip to content

Commit 75764a2

Browse files
committed
fix: In runInit, install gobind without @latest .
To "make sure gobind is up to date", runInit calls goInstall with "golang.org/x/mobile/cmd/gobind@latest" . But it shouldn't have "@latest". This instruction can replace the gobind command in the user's $GOPATH/bin with an unexpected version. Also, it is possible that "@latest" has a breaking change with the user's application. It is better to call goInstall without "@latest" so that it will follow the directives in the user's go.mod file. Signed-off-by: jefft0 <[email protected]>
1 parent 8578da9 commit 75764a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gomobile/init.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func runInit(cmd *command) error {
8080
}()
8181

8282
// Make sure gobind is up to date.
83-
if err := goInstall([]string{"golang.org/x/mobile/cmd/gobind@latest"}, nil); err != nil {
83+
if err := goInstall([]string{"golang.org/x/mobile/cmd/gobind"}, nil); err != nil {
8484
return err
8585
}
8686

0 commit comments

Comments
 (0)