From 8b0a41744d84bb14e04cd470e1fc5cbc0e2cba15 Mon Sep 17 00:00:00 2001 From: Tobias Gesellchen Date: Wed, 13 May 2026 18:29:40 +0200 Subject: [PATCH] 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) --- cmd/soundtouch-cli/cmd_setup.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/soundtouch-cli/cmd_setup.go b/cmd/soundtouch-cli/cmd_setup.go index b134bc8..96c2fa1 100644 --- a/cmd/soundtouch-cli/cmd_setup.go +++ b/cmd/soundtouch-cli/cmd_setup.go @@ -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)