aboutsummaryrefslogtreecommitdiffhomepage
path: root/loader
diff options
context:
space:
mode:
Diffstat (limited to 'loader')
-rw-r--r--loader/goroot.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/loader/goroot.go b/loader/goroot.go
index b6812badc..c1479b642 100644
--- a/loader/goroot.go
+++ b/loader/goroot.go
@@ -207,6 +207,11 @@ func listGorootMergeLinks(goroot, tinygoroot string, overrides map[string]bool)
merges[dir] = filepath.Join(goroot, dir)
}
+ // Required starting in Go 1.21 due to https://github.com/golang/go/issues/61928
+ if _, err := os.Stat(filepath.Join(goroot, "go.env")); err == nil {
+ merges["go.env"] = filepath.Join(goroot, "go.env")
+ }
+
return merges, nil
}