mirror of
https://github.com/burrowers/garble.git
synced 2025-09-26 20:01:16 +08:00
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.
This commit is contained in:

committed by
Paul Scheduikat

parent
96a954792d
commit
c23dd1672b
@@ -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 {
|
||||
|
Reference in New Issue
Block a user