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

fix bug that caused credentials popup to be raised unexpectedly

This commit is contained in:
Jesse Duffield
2022-01-08 14:41:30 +11:00
parent 0dd1c12e2f
commit fdf79fdeee
4 changed files with 18 additions and 9 deletions

View File

@ -27,10 +27,10 @@ type guiIO struct {
// this allows us to request info from the user like username/password, in the event
// that a command requests it.
// the 'credential' arg is something like 'username' or 'password'
promptForCredentialFn func(credential string) string
promptForCredentialFn func(credential CredentialName) string
}
func NewGuiIO(log *logrus.Entry, logCommandFn func(string, bool), newCmdWriterFn func() io.Writer, promptForCredentialFn func(string) string) *guiIO {
func NewGuiIO(log *logrus.Entry, logCommandFn func(string, bool), newCmdWriterFn func() io.Writer, promptForCredentialFn func(CredentialName) string) *guiIO {
return &guiIO{
log: log,
logCommandFn: logCommandFn,
@ -44,6 +44,6 @@ func NewNullGuiIO(log *logrus.Entry) *guiIO {
log: log,
logCommandFn: func(string, bool) {},
newCmdWriterFn: func() io.Writer { return ioutil.Discard },
promptForCredentialFn: func(string) string { return "" },
promptForCredentialFn: func(CredentialName) string { return "" },
}
}