From 99a83efc34a6acb91f69d96d233e029e801f7a8c Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 9 Oct 2025 13:08:14 +0200 Subject: [PATCH] Set LC_MESSAGES too I'm not sure this is necessary, but it doesn't hurt. --- pkg/commands/git_commands/rebase.go | 10 ++++++---- pkg/commands/oscommands/cmd_obj_runner.go | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/commands/git_commands/rebase.go b/pkg/commands/git_commands/rebase.go index 6d89276d6..a49749084 100644 --- a/pkg/commands/git_commands/rebase.go +++ b/pkg/commands/git_commands/rebase.go @@ -244,8 +244,9 @@ func (self *RebaseCommands) PrepareInteractiveRebaseCommand(opts PrepareInteract cmdObj.AddEnvVars( "DEBUG="+debug, - "LANG=C", // Force using English language - "LC_ALL=C", // Force using English language + "LANG=C", // Force using English language + "LC_ALL=C", // Force using English language + "LC_MESSAGES=C", // Force using English language "GIT_SEQUENCE_EDITOR="+gitSequenceEditor, ) @@ -277,8 +278,9 @@ func (self *RebaseCommands) GitRebaseEditTodo(todosFileContent []byte) error { cmdObj.AddEnvVars( "DEBUG="+debug, - "LANG=C", // Force using English language - "LC_ALL=C", // Force using English language + "LANG=C", // Force using English language + "LC_ALL=C", // Force using English language + "LC_MESSAGES=C", // Force using English language "GIT_EDITOR="+ex, "GIT_SEQUENCE_EDITOR="+ex, ) diff --git a/pkg/commands/oscommands/cmd_obj_runner.go b/pkg/commands/oscommands/cmd_obj_runner.go index 49e608a60..953937706 100644 --- a/pkg/commands/oscommands/cmd_obj_runner.go +++ b/pkg/commands/oscommands/cmd_obj_runner.go @@ -330,7 +330,7 @@ func (self *cmdObjRunner) runAndDetectCredentialRequest( promptUserForCredential func(CredentialType) <-chan string, ) error { // setting the output to english so we can parse it for a username/password request - cmdObj.AddEnvVars("LANG=C", "LC_ALL=C") + cmdObj.AddEnvVars("LANG=C", "LC_ALL=C", "LC_MESSAGES=C") return self.runAndStreamAux(cmdObj, func(handler *cmdHandler, cmdWriter io.Writer) { tr := io.TeeReader(handler.stdoutPipe, cmdWriter)