/cmd/bd/federation.go: fix windows build issue again

This commit is contained in:
Test
2026-01-21 14:08:40 -08:00
parent 7670112341
commit 01fa2d9f3f

View File

@@ -4,7 +4,6 @@ import (
"fmt"
"os"
"strings"
"syscall"
"github.com/spf13/cobra"
"github.com/steveyegge/beads/internal/storage"
@@ -374,7 +373,7 @@ func runFederationAddPeer(cmd *cobra.Command, args []string) {
password := federationPassword
if federationUser != "" && password == "" {
fmt.Fprint(os.Stderr, "Password: ")
pwBytes, err := term.ReadPassword(syscall.Stdin)
pwBytes, err := term.ReadPassword(int(os.Stdin.Fd()))
fmt.Fprintln(os.Stderr) // newline after password
if err != nil {
FatalErrorRespectJSON("failed to read password: %v", err)