]> Cypherpunks repositories - gostls13.git/commit
cmd/go: quote entries in list-valued variables for go env in plan9
authormiller <millerresearch@gmail.com>
Mon, 8 May 2023 15:56:21 +0000 (16:56 +0100)
committerGopher Robot <gobot@golang.org>
Wed, 24 May 2023 21:48:53 +0000 (21:48 +0000)
commit05cc9e55876874462a4726ca0101c970838c80e5
tree2add8d3a6453452074cedf883d04c0ad7b8dcb33
parent97f56645e23953318de69e3f619df61e052d46c4
cmd/go: quote entries in list-valued variables for go env in plan9

When 'go env' without an argument prints environment variables as
a script which can be executed by the shell, variables with a
list value in Plan 9 (such as GOPATH) need to be printed with each
element enclosed in single quotes in case it contains characters
significant to the Plan 9 shell (such as ' ' or '=').

For #58508

Change-Id: Ia30f51307cc6d07a7e3ada6bf9d60bf9951982ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/493535
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/go/internal/envcmd/env.go