1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-04 03:48:07 +02:00

Translated credentials error with git push/pull/fetch

This commit is contained in:
mjarkk 2018-12-19 10:06:58 +01:00
parent 097f687efe
commit 800b40ecc4
2 changed files with 7 additions and 1 deletions

View File

@ -25,7 +25,7 @@ func RunCommandWithOutputLiveWrapper(c *OSCommand, command string, output func(s
cmd := exec.Command(splitCmd[0], splitCmd[1:]...)
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, "LANG=en_US.utf8", "LC_ALL=en_US.UTF-8")
cmd.Env = append(cmd.Env, "LANG=en_US.UTF-8", "LC_ALL=en_US.UTF-8")
var stderr bytes.Buffer
cmd.Stderr = &stderr

View File

@ -1,6 +1,9 @@
package gui
import (
"errors"
"strings"
"github.com/jesseduffield/gocui"
)
@ -89,6 +92,9 @@ func (gui *Gui) HandleCredentialsPopup(g *gocui.Gui, popupOpened bool, cmdErr er
_, _ = gui.g.SetViewOnBottom("credentials")
}
if cmdErr != nil {
if strings.Contains(cmdErr.Error(), "Invalid username or password") {
cmdErr = errors.New(gui.Tr.SLocalize("PassUnameWrong"))
}
// we are not logging this error because it may contain a password
_ = gui.createSpecificErrorPanel(cmdErr.Error(), gui.getFilesView(gui.g), false)
} else {