fix-stdin-int (#30)

This commit is contained in:
T. von Dein
2026-09-01 13:17:24 +02:00
parent 497b8b3201
commit 2a01c6f9a7
2 changed files with 4 additions and 1 deletions

View File

@@ -18,6 +18,8 @@ builds:
- windows - windows
- darwin - darwin
- freebsd - freebsd
goarch:
- amd64
archives: archives:
- formats: [tar.gz] - formats: [tar.gz]

View File

@@ -49,7 +49,8 @@ type Key struct {
func AskForPassword() ([]byte, error) { func AskForPassword() ([]byte, error) {
fmt.Fprint(os.Stderr, "Password: ") fmt.Fprint(os.Stderr, "Password: ")
pass, err := term.ReadPassword(syscall.Stdin) // nolint: unconvert
pass, err := term.ReadPassword(int(syscall.Stdin))
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to read password: %w", err) return nil, fmt.Errorf("failed to read password: %w", err)
} }