Skip to content

Commit

Permalink
Cast syscall.Stdin into int for windows support
Browse files Browse the repository at this point in the history
ref: golang/go#12978

Signed-off-by: moznion <[email protected]>
  • Loading branch information
moznion committed Apr 6, 2022
1 parent 0031dc3 commit 791b859
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,12 @@ func initialize(rcFilePath string) error {
pswd := make([]byte, 0)
if shouldSetMasterPswd == "y" || shouldSetMasterPswd == "yes" {
fmt.Print("master password: ")
pswd, err = terminal.ReadPassword(syscall.Stdin)
pswd, err = terminal.ReadPassword(int(syscall.Stdin))
if err != nil {
return err
}
fmt.Print("\nmaster password (confirm): ")
confirmPswd, err := terminal.ReadPassword(syscall.Stdin)
confirmPswd, err := terminal.ReadPassword(int(syscall.Stdin))
fmt.Printf("\n")
if err != nil {
return err
Expand Down

0 comments on commit 791b859

Please sign in to comment.