Skip to content

Commit

Permalink
Convert syscall.Handle to int for Windows builds (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe authored Aug 7, 2019
1 parent a073802 commit 2ffb75c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/login/interactive_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func securePrompt(input io.Reader) (string, error) {
return "", err
}

buf, err := terminal.ReadPassword(syscall.Stdin)
buf, err := terminal.ReadPassword(int(syscall.Stdin)) //nolint:unconvert
if err != nil {
return "", err
}
Expand All @@ -122,7 +122,7 @@ func securePrompt(input io.Reader) (string, error) {
}

func protectTerminalState() (chan os.Signal, error) {
originalTerminalState, err := terminal.GetState(syscall.Stdin)
originalTerminalState, err := terminal.GetState(int(syscall.Stdin)) //nolint:unconvert
if err != nil {
return nil, err
}
Expand All @@ -131,7 +131,7 @@ func protectTerminalState() (chan os.Signal, error) {
signal.Notify(signalChan, os.Interrupt)
go func() {
<-signalChan
terminal.Restore(syscall.Stdin, originalTerminalState)
terminal.Restore(int(syscall.Stdin), originalTerminalState) //nolint:unconvert
os.Exit(1)
}()

Expand Down

0 comments on commit 2ffb75c

Please sign in to comment.