From c23dd1672b4b07c628ebf213603ba86430ef6849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Thu, 6 Mar 2025 21:51:51 +0000 Subject: [PATCH] use LC_ALL=C rather than LANG=en_US LC_ALL overrides all settings rather than setting a default. And C is the English locale that should be used for scripting. --- internal/linker/linker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/linker/linker.go b/internal/linker/linker.go index 293ec6a..d02ca8f 100644 --- a/internal/linker/linker.go +++ b/internal/linker/linker.go @@ -117,7 +117,8 @@ func applyPatches(srcDir, workingDir string, modFiles map[string]bool, patches [ // by default treats workingDir as a subfolder of repository, so it will break git apply. Adding --git-dir flag blocks this behavior. cmd := exec.Command("git", "--git-dir", workingDir, "apply", "--verbose") cmd.Dir = workingDir - cmd.Env = append(cmd.Env, "LANG=en_US") + // Ensure that the output messages are in plain English. + cmd.Env = append(cmd.Env, "LC_ALL=C") cmd.Stdin = bytes.NewReader(bytes.Join(patches, []byte("\n"))) out, err := cmd.CombinedOutput() if err != nil {