Skip to content

Commit 67d465f

Browse files
authored
Merge pull request #1232 from makiuchi-d/fix-build-failed-with-go1.21.0
Avoid build failures with Go 1.21.0 installed in the environment.
2 parents 4859c71 + 67798d8 commit 67d465f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (sc simpleCtx) gotool(subcommand string, args ...string) (string, error) {
179179
panic(fmt.Errorf("can't use go tool with a virtual build context"))
180180
}
181181
args = append([]string{subcommand}, args...)
182-
cmd := exec.Command("go", args...)
182+
cmd := exec.Command(filepath.Join(sc.bctx.GOROOT, "bin", "go"), args...)
183183

184184
if sc.bctx.Dir != "" {
185185
cmd.Dir = sc.bctx.Dir

0 commit comments

Comments
 (0)