Skip to content

Commit

Permalink
internal/coordinator/remote: export base environment for ssh
Browse files Browse the repository at this point in the history
For golang/go#32430

Change-Id: Id4e1a4fa337e45c38fd702914edf5c4ed60be8fb
Reviewed-on: https://go-review.googlesource.com/c/build/+/418654
Reviewed-by: Bryan Mills <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
  • Loading branch information
ianlancetaylor authored and gopherbot committed Jul 21, 2022
1 parent dcd7d5a commit d35cb80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/coordinator/remote/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ func (ss *SSHServer) setupRemoteSSHEnv(bconf *dashboard.BuildConfig, workDir str
// A Unix system.
for _, env := range bconf.Env() {
fmt.Fprintln(f, env)
if idx := strings.Index(env, "="); idx > 0 {
fmt.Fprintf(f, "export %s\n", env[:idx])
}
}
fmt.Fprintf(f, "GOPATH=%s/gopath\n", workDir)
fmt.Fprintf(f, "PATH=$PATH:%s/go/bin\n", workDir)
Expand Down

0 comments on commit d35cb80

Please sign in to comment.