mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-07-13 05:09:09 +00:00
Replace usages of term.ReadPassword with util.ReadPassword
This commit is contained in:
parent
bfbc15bd0d
commit
440f41a2af
3 changed files with 5 additions and 10 deletions
|
@ -2,13 +2,11 @@ package cmd
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"syscall"
|
||||
|
||||
"github.com/passbolt/go-passbolt-cli/util"
|
||||
"github.com/passbolt/go-passbolt/api"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/term"
|
||||
)
|
||||
|
||||
// verifyCMD represents the verify command
|
||||
|
@ -35,12 +33,12 @@ var verifyCMD = &cobra.Command{
|
|||
userPassword := viper.GetString("userPassword")
|
||||
if userPassword == "" {
|
||||
fmt.Print("Enter Password:")
|
||||
bytepw, err := term.ReadPassword(int(syscall.Stdin))
|
||||
pw, err := util.ReadPassword()
|
||||
if err != nil {
|
||||
fmt.Println()
|
||||
return fmt.Errorf("Reading Password: %w", err)
|
||||
}
|
||||
userPassword = string(bytepw)
|
||||
userPassword = pw
|
||||
fmt.Println()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue