Skip to content

Commit

Permalink
replaced platform-dependant syscall.Stdin with os.Stdin.Fd
Browse files Browse the repository at this point in the history
  • Loading branch information
graynk committed Jun 30, 2022
1 parent ffac587 commit c3487a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"bytes"
"encoding/json"
"fmt"
"golang.org/x/term"
"os"
"syscall"

"golang.org/x/term"
)

func errAndExit(message string, err error) {
Expand Down Expand Up @@ -42,7 +42,7 @@ func main() {
errAndExit("Improperly formatted JSON file: %v", err)
}
fmt.Println("Please input your master password")
password, err := term.ReadPassword(syscall.Stdin)
password, err := term.ReadPassword(int(os.Stdin.Fd()))
if err != nil {
errAndExit("Failed to read password from input: %v", err)
}
Expand Down

0 comments on commit c3487a8

Please sign in to comment.