diff --git a/xgo.go b/xgo.go index 1072cd7..773ad16 100644 --- a/xgo.go +++ b/xgo.go @@ -350,7 +350,7 @@ func compile(image string, config *ConfigFlags, flags *BuildFlags, folder string } if usesModules { args = append(args, []string{"-e", "GO111MODULE=on"}...) - args = append(args, []string{"-v", os.Getenv("GOPATH") + ":/go"}...) + args = append(args, []string{"-v", build.Default.GOPATH + ":/go"}...) // Map this repository to the /source folder absRepository, err := filepath.Abs(config.Repository)