fix(setup): cast syscall.Stdin to int for Windows cross-compile

term.ReadPassword takes an int, but syscall.Stdin is syscall.Handle
(uintptr) on Windows. The explicit cast keeps the call building on
Windows while a //nolint:unconvert silences the false positive on Unix
where syscall.Stdin is already int.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tobias Gesellchen
2026-05-13 18:43:36 +02:00
co-authored by Claude Opus 4.7
parent e3450ffd00
commit 8b0a41744d
+3 -1
View File
@@ -669,7 +669,9 @@ func promptBasicAuth() (string, string, error) {
fmt.Fprint(os.Stderr, "Password: ")
pass, err := term.ReadPassword(syscall.Stdin)
// syscall.Stdin is int on Unix but syscall.Handle on Windows; the cast is
// required for the Windows cross-compile.
pass, err := term.ReadPassword(int(syscall.Stdin)) //nolint:unconvert
fmt.Fprintln(os.Stderr)