зеркало из https://github.com/golang/tools.git
internal/gocommand: skip ill-formed env vars in cmdDebugStr
Fixes golang/vscode-go#2260 Change-Id: I4dbdb1d582e3b434bce9f0e923899d8af6a43f3d Reviewed-on: https://go-review.googlesource.com/c/tools/+/408376 gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
This commit is contained in:
Родитель
ccb10502d1
Коммит
f38573358c
|
@ -264,8 +264,10 @@ func cmdDebugStr(cmd *exec.Cmd) string {
|
|||
env := make(map[string]string)
|
||||
for _, kv := range cmd.Env {
|
||||
split := strings.SplitN(kv, "=", 2)
|
||||
k, v := split[0], split[1]
|
||||
env[k] = v
|
||||
if len(split) == 2 {
|
||||
k, v := split[0], split[1]
|
||||
env[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
var args []string
|
||||
|
|
Загрузка…
Ссылка в новой задаче