Skip to content

Commit 99a83ef

Browse files
committed
Set LC_MESSAGES too
I'm not sure this is necessary, but it doesn't hurt.
1 parent b755f52 commit 99a83ef

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

pkg/commands/git_commands/rebase.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,9 @@ func (self *RebaseCommands) PrepareInteractiveRebaseCommand(opts PrepareInteract
244244

245245
cmdObj.AddEnvVars(
246246
"DEBUG="+debug,
247-
"LANG=C", // Force using English language
248-
"LC_ALL=C", // Force using English language
247+
"LANG=C", // Force using English language
248+
"LC_ALL=C", // Force using English language
249+
"LC_MESSAGES=C", // Force using English language
249250
"GIT_SEQUENCE_EDITOR="+gitSequenceEditor,
250251
)
251252

@@ -277,8 +278,9 @@ func (self *RebaseCommands) GitRebaseEditTodo(todosFileContent []byte) error {
277278

278279
cmdObj.AddEnvVars(
279280
"DEBUG="+debug,
280-
"LANG=C", // Force using English language
281-
"LC_ALL=C", // Force using English language
281+
"LANG=C", // Force using English language
282+
"LC_ALL=C", // Force using English language
283+
"LC_MESSAGES=C", // Force using English language
282284
"GIT_EDITOR="+ex,
283285
"GIT_SEQUENCE_EDITOR="+ex,
284286
)

pkg/commands/oscommands/cmd_obj_runner.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func (self *cmdObjRunner) runAndDetectCredentialRequest(
330330
promptUserForCredential func(CredentialType) <-chan string,
331331
) error {
332332
// setting the output to english so we can parse it for a username/password request
333-
cmdObj.AddEnvVars("LANG=C", "LC_ALL=C")
333+
cmdObj.AddEnvVars("LANG=C", "LC_ALL=C", "LC_MESSAGES=C")
334334

335335
return self.runAndStreamAux(cmdObj, func(handler *cmdHandler, cmdWriter io.Writer) {
336336
tr := io.TeeReader(handler.stdoutPipe, cmdWriter)

0 commit comments

Comments
 (0)