mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
loader: merge go.env file which is now required starting in Go 1.21 to correctly get required packages
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user