]> Cypherpunks repositories - gostls13.git/commit
cmd/go: quote fragments in CGO_ env variables reported by 'go env'
authorBryan C. Mills <bcmills@google.com>
Fri, 1 Apr 2022 18:54:39 +0000 (14:54 -0400)
committerBryan Mills <bcmills@google.com>
Tue, 5 Apr 2022 14:15:59 +0000 (14:15 +0000)
commit62bceae32de7bad48fbdc1fe3fae14c81cd093d2
tree5b0657d519b112ac948c987db021e66e96bc545c
parenta5f801f39d8c9d4df2edfd6ffd9171b9216445d1
cmd/go: quote fragments in CGO_ env variables reported by 'go env'

These fields have been parsed as quoted fields since CL 334732,
but we missed the unparsing side in 'go env'.

Certain scripts (notably make.ba{sh,t}) expect to be able to set the
environment to exactly what 'go env' reports, so for round-trip
purposes it is important to match the marshaling and unmarshaling
functions.

(Noticed while debugging #52009.)
Updates #41400

Change-Id: I0ff39b7a6e1328111c285c97cd23f79b723f3c73
Reviewed-on: https://go-review.googlesource.com/c/go/+/398058
Trust: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/internal/envcmd/env.go