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:
parent
097f687efe
commit
800b40ecc4
@ -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
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user