Commit 0941dc44 authored by Eugene Kalinin's avatar Eugene Kalinin Committed by Jay Conrod
Browse files

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: default avatarJay Conrod <jayconrod@google.com>
Trust: Bryan C. Mills <bcmills@google.com>
Trust: Jay Conrod <jayconrod@google.com>
parent 67edc0ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment