aboutsummaryrefslogtreecommitdiff
path: root/ask.go
diff options
context:
space:
mode:
Diffstat (limited to 'ask.go')
-rw-r--r--ask.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/ask.go b/ask.go
index df8f62e..c439bb5 100644
--- a/ask.go
+++ b/ask.go
@@ -12,10 +12,8 @@ var (
ErrNoMatch = errors.New("passwords don't match")
)
-func AskPassword(f *os.File, confirm bool) (string, error) {
- if f == nil {
- f = os.Stdin
- }
+func AskPassword(confirm bool) (string, error) {
+ f := os.Stdin
fd := f.Fd()
oldState, err := terminal.MakeRaw(int(fd))