mirror of https://github.com/golang/go.git
internal/lsp: force LANG setting while difftest
difftest using output of GNU diff, which will be translated based on LANG settings. Fixes golang/go#42962 Change-Id: Id4ae22da04077eb7cda7faace306fdbe1836ec60 Reviewed-on: https://go-review.googlesource.com/c/tools/+/274992 Trust: Meng Zhuo <mzh@golangcn.org> Run-TryBot: Meng Zhuo <mzh@golangcn.org> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
545788942d
commit
a679dec0fd
|
|
@ -65,6 +65,7 @@ func getDiffOutput(a, b string) (string, error) {
|
|||
return "", err
|
||||
}
|
||||
cmd := exec.Command("diff", "-u", fileA.Name(), fileB.Name())
|
||||
cmd.Env = append(cmd.Env, "LANG=en_US.UTF-8")
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
if _, ok := err.(*exec.ExitError); !ok {
|
||||
|
|
|
|||
Loading…
Reference in New Issue