test and logic fixes

This commit is contained in:
2026-05-30 17:08:14 -05:00
parent 430b018aa9
commit 83c929c24b
11 changed files with 56 additions and 32 deletions
+1
View File
@@ -260,6 +260,7 @@ func TestPromptGitHubTokenAcceptThenEmpty(t *testing.T) {
// password read can't be cleanly mocked.
stdin = strings.NewReader("y\n")
defer func() { stdin = os.Stdin }()
readPassword = func() ([]byte, error) { return nil, errors.New("mocked error") }
captureStdout(t, func() {
// term.ReadPassword on a non-terminal returns an error,
// landing in the "could not read token" warn branch.