feat: add interactive terminal password prompt for keychain unlock (#558)

* feat(darwin): add interactive terminal password prompt for keychain unlock (#556)
* test: add unit tests for keyretriever and address review feedback

- Add errStorageNotFound sentinel error for precise error matching
- Non-TTY TerminalPasswordRetriever returns nil silently (review #558)
- Add darwin tests: findStorageKey, empty password, non-TTY skip
- Add linux tests: FallbackRetriever peanuts key, DefaultRetriever chain

* fix: add nolint:unused for errStorageNotFound on Windows, clean up error message

errStorageNotFound is only used on darwin/linux; Windows lint flagged it
as unused. Also simplify error format to avoid "storage" duplication.

* fix: add nolint:unused for errStorageNotFound, simplify error message

errStorageNotFound is only referenced on darwin and linux; Windows lint
flags it as unused. Also remove redundant "storage" prefix from the
error format string.
This commit is contained in:
Roger
2026-04-06 01:27:13 +08:00
committed by GitHub
parent 4c3dd9704f
commit ccc8643d86
8 changed files with 181 additions and 27 deletions
+2
View File
@@ -11,6 +11,8 @@ updates:
versions: [">=1.32.0"] # v1.32+ requires Go 1.21, project is pinned to Go 1.20
- dependency-name: "golang.org/x/text" # indirect dep, newer versions may require Go 1.21+
- dependency-name: "golang.org/x/sys" # newer versions require Go 1.21+
- dependency-name: "golang.org/x/term"
versions: [">=0.30.0"] # v0.30.0+ requires Go 1.23, project is pinned to Go 1.20
- package-ecosystem: "github-actions"
directory: "/"
schedule: