Skip to content

Commit

Permalink
misc/ios: don't override TMPDIR on idevice
Browse files Browse the repository at this point in the history
If TMPDIR is not set, the iOS runtime will automatically set TMPDIR
to a valid app temporary path.

For the iOS builders.

Change-Id: Ia82404059dcb10678f0a6e0c96d5efc79a5485fd
Reviewed-on: https://go-review.googlesource.com/110956
Run-TryBot: Elias Naur <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Brad Fitzpatrick <[email protected]>
  • Loading branch information
Elias Naur committed May 2, 2018
1 parent 28b40f3 commit 8cd0094
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions misc/ios/go_darwin_arm_exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,15 @@ func run(appdir, deviceapp string, args []string) error {
deviceapp,
)
lldb.Args = append(lldb.Args, args...)
var env []string
for _, e := range os.Environ() {
// Don't override TMPDIR on the device.
if strings.HasPrefix(e, "TMPDIR=") {
continue
}
env = append(env, e)
}
lldb.Env = env
lldb.Stdin = strings.NewReader(lldbDriver)
lldb.Stdout = os.Stdout
lldb.Stderr = os.Stderr
Expand Down

0 comments on commit 8cd0094

Please sign in to comment.