Skip to content

Commit 9a2aa65

Browse files
committed
require golang envs
1 parent 39de25e commit 9a2aa65

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

internal/ext/process/gen.go

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ func (r *Runner) Invoke(ctx context.Context, method string, args any, reply any,
7171
}
7272
cmd = exec.CommandContext(ctx, path, method)
7373
cmd.Args = []string{"go", "run", r.GoPkg}
74+
r.Env = append(r.Env, []string{
75+
"GO111MODULE",
76+
"GOROOT",
77+
"GOPATH",
78+
"GOPROXY",
79+
"GOPRIVATE",
80+
"GONOPROXY",
81+
"GONOSUMDB",
82+
"GOMODCACHE",
83+
"GOFLAGS",
84+
"GOCACHE",
85+
"GOENV",
86+
"HOME",
87+
}...)
7488
}
7589

7690
cmd.Stdin = bytes.NewReader(stdin)

0 commit comments

Comments
 (0)