misc/ios: don't override TMPDIR on idevice

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 <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Elias Naur 2018-05-02 20:13:14 +02:00
parent 28b40f3528
commit 8cd0094b4e

View File

@ -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