File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -91,21 +91,21 @@ loop:
91
91
92
92
// PromptPassword is a specialized text input that doesn't display the characters entered.
93
93
func PromptPassword (prompt , name string , validators ... PromptValidator ) (string , error ) {
94
- termState , err := terminal .GetState (syscall .Stdin )
94
+ termState , err := terminal .GetState (int ( syscall .Stdin ) )
95
95
if err != nil {
96
96
return "" , err
97
97
}
98
98
99
99
cancel := interrupt .RegisterCleaner (func () error {
100
- return terminal .Restore (syscall .Stdin , termState )
100
+ return terminal .Restore (int ( syscall .Stdin ) , termState )
101
101
})
102
102
defer cancel ()
103
103
104
104
loop:
105
105
for {
106
106
_ , _ = fmt .Fprintf (os .Stderr , "%s: " , prompt )
107
107
108
- bytePassword , err := terminal .ReadPassword (syscall .Stdin )
108
+ bytePassword , err := terminal .ReadPassword (int ( syscall .Stdin ) )
109
109
// new line for coherent formatting, ReadPassword clip the normal new line
110
110
// entered by the user
111
111
fmt .Println ()
You can’t perform that action at this time.
0 commit comments