1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-21 12:16:54 +02:00

Fix crash when a background fetch prompts for credentials (#2789)

This commit is contained in:
Stefan Haller 2023-07-19 10:19:18 +02:00 committed by GitHub
commit b1a090d4c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -331,9 +331,13 @@ func (self *cmdObjRunner) processOutput(
askFor, ok := checkForCredentialRequest(newBytes)
if ok {
responseChan := promptUserForCredential(askFor)
task.Pause()
if task != nil {
task.Pause()
}
toInput := <-responseChan
task.Continue()
if task != nil {
task.Continue()
}
// If the return data is empty we don't write anything to stdin
if toInput != "" {
_, _ = writer.Write([]byte(toInput))