Skip to content

Commit

Permalink
Fix terminal.ReadPassword for windows os
Browse files Browse the repository at this point in the history
  • Loading branch information
janos committed Dec 28, 2019
1 parent 94281f8 commit 5849db8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions newreleases/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ package cmd
import (
"os"
"strings"
"syscall"

"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand All @@ -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
}
Expand Down

0 comments on commit 5849db8

Please sign in to comment.