@@ -235,13 +235,6 @@ func xinit() {
235
235
// make.bash really does start from a clean slate.
236
236
os .Setenv ("GOCACHE" , pathf ("%s/pkg/obj/go-build" , goroot ))
237
237
238
- // Set GOPATH to an internal directory. We shouldn't actually
239
- // need to store files here, since the toolchain won't
240
- // depend on modules outside of vendor directories, but if
241
- // GOPATH points somewhere else (e.g., to GOROOT), the
242
- // go tool may complain.
243
- os .Setenv ("GOPATH" , pathf ("%s/pkg/obj/gopath" , goroot ))
244
-
245
238
// Make the environment more predictable.
246
239
os .Setenv ("LANG" , "C" )
247
240
os .Setenv ("LANGUAGE" , "en_US.UTF8" )
@@ -1211,6 +1204,13 @@ func cmdbootstrap() {
1211
1204
1212
1205
xflagparse (0 )
1213
1206
1207
+ // Set GOPATH to an internal directory. We shouldn't actually
1208
+ // need to store files here, since the toolchain won't
1209
+ // depend on modules outside of vendor directories, but if
1210
+ // GOPATH points somewhere else (e.g., to GOROOT), the
1211
+ // go tool may complain.
1212
+ os .Setenv ("GOPATH" , pathf ("%s/pkg/obj/gopath" , goroot ))
1213
+
1214
1214
if debug {
1215
1215
// cmd/buildid is used in debug mode.
1216
1216
toolchain = append (toolchain , "cmd/buildid" )
0 commit comments