]> Cypherpunks repositories - gostls13.git/commit
cmd/go: env -w validates GOTMPDIR value
authorEugene Kalinin <e.v.kalinin@gmail.com>
Mon, 24 Aug 2020 22:49:39 +0000 (01:49 +0300)
committerJay Conrod <jayconrod@google.com>
Wed, 7 Oct 2020 15:43:35 +0000 (15:43 +0000)
commit0941dc446e6b3028c77158728432086b5c06acf6
treea60e82fa2cca9a603b569d1022f487b0fb05b7fd
parent67edc0ed81947a55adbcd0c9d2317abb93ac9510
cmd/go: env -w validates GOTMPDIR value

This change makes go env -w check if GOTMPDIR is an absolute path.

If GOTMPDIR is not an absolute and not existing path there will be an
error at every `work.Builder.Init()`. If `go env` has `-u/-w` as
argument `work.Builder.Init()` is not called.

`go env -w GOTMPDIR=` work in the same way as `go env -u GOTMPDIR`.

Fixes #40932

Change-Id: I6b0662302eeace7f20460b6d26c6e59af1111da2
Reviewed-on: https://go-review.googlesource.com/c/go/+/250198
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/envcmd/env.go
src/cmd/go/testdata/script/env_write.txt