Skip to content

Commit 2a8ef71

Browse files
committed
Use PTY also with credentialStrategy=FAIL
This is a regression introduced with a199ed1; it is important to use a PTY even with credentialStrategy=FAIL, otherwise the fetch command will spew the credentials request into the UI and then hang. This fixes the problem that background fetching makes lazygit hang when the fetch request needs to prompt for a passphrase. For Mac users who use the keychain to store their ssh passphrases, this can happen when lazygit is running while the machine goes to sleep, because macOS looks the keychain in that case.
1 parent 6705428 commit 2a8ef71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/commands/oscommands/cmd_obj.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ func (self *CmdObj) PromptOnCredentialRequest(task gocui.Task) *CmdObj {
196196

197197
func (self *CmdObj) FailOnCredentialRequest() *CmdObj {
198198
self.credentialStrategy = FAIL
199+
self.usePty = true
199200

200201
return self
201202
}

0 commit comments

Comments
 (0)