Skip to content

Commit

Permalink
[auth] Fix password prompt on Windows
Browse files Browse the repository at this point in the history
It was wrong to just assume that stdin is "0" everywhere.

Followup to 7514fa2

Fixes #2276
  • Loading branch information
mislav committed Sep 23, 2019
1 parent 63aee40 commit 67a98b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion github/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (c *Config) scanLine() string {
}

func getPassword() (string, error) {
stdin := 0 // syscall.Stdin
stdin := int(syscall.Stdin)
initialTermState, err := terminal.GetState(stdin)
if err != nil {
return "", err
Expand Down

0 comments on commit 67a98b4

Please sign in to comment.