mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 00:26:29 +00:00
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:
co-authored by
Claude Opus 4.7
parent
e3450ffd00
commit
8b0a41744d
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user