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

@ -24,9 +24,9 @@ var _ ICmdObjRunner = &cmdObjRunner{}
func (self *cmdObjRunner) runWithCredentialHandling(cmdObj ICmdObj) error {
switch cmdObj.GetCredentialStrategy() {
case PROMPT:
return self.RunCommandWithOutputLive(cmdObj, self.guiIO.promptForCredentialFn)
return self.RunAndDetectCredentialRequest(cmdObj, self.guiIO.promptForCredentialFn)
case FAIL:
return self.RunCommandWithOutputLive(cmdObj, func(s string) string { return "\n" })
return self.RunAndDetectCredentialRequest(cmdObj, func(CredentialName) string { return "\n" })
}
// we should never land here