From 5849db88b56bdacaa8d841388b3e0c2fb5527939 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Sat, 28 Dec 2019 17:35:43 +0100 Subject: [PATCH] Fix terminal.ReadPassword for windows os --- newreleases/cmd/cmd.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/newreleases/cmd/cmd.go b/newreleases/cmd/cmd.go index fbde664..9e5145d 100644 --- a/newreleases/cmd/cmd.go +++ b/newreleases/cmd/cmd.go @@ -8,7 +8,6 @@ package cmd import ( "os" "strings" - "syscall" "github.com/spf13/cobra" "github.com/spf13/viper" @@ -28,7 +27,7 @@ type passwordReader interface { type stdInPasswordReader struct{} func (stdInPasswordReader) ReadPassword() (password string, err error) { - v, err := terminal.ReadPassword(syscall.Stdin) + v, err := terminal.ReadPassword(int(os.Stdin.Fd())) if err != nil { return "", err }