mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Fix crash when a background fetch prompts for credentials (#2789)
This commit is contained in:
commit
b1a090d4c0
1 changed files with 6 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue