From 54c14a1537f7b30a6539206f00bbe87941bf91f9 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Thu, 5 Dec 2024 14:07:00 +0100 Subject: [PATCH] fix std.in syscall when building for windows --- pkg/utils/print.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/utils/print.go b/pkg/utils/print.go index b3b2c7a0..abfe9653 100644 --- a/pkg/utils/print.go +++ b/pkg/utils/print.go @@ -5,7 +5,6 @@ import ( "fmt" "os" "strings" - "syscall" "github.com/fatih/color" "github.com/olekukonko/tablewriter" @@ -49,7 +48,7 @@ func ReadLineDefault(prompt string, def string) (string, error) { func ReadPwd(prompt string) (string, error) { _, _ = color.New(color.Bold).Printf(prompt) //nolint:govet - pwd, err := term.ReadPassword(syscall.Stdin) + pwd, err := term.ReadPassword(int(os.Stdin.Fd())) return strings.TrimSpace(string(pwd)), err }