mirror of
https://github.com/passbolt/go-passbolt-cli.git
synced 2025-05-12 02:58:20 +00:00
improve interactive Password Entry
This commit is contained in:
parent
5d1add84d1
commit
7b553fae9f
1 changed files with 2 additions and 0 deletions
|
@ -27,9 +27,11 @@ func GetClient(ctx context.Context) (*api.Client, error) {
|
||||||
fmt.Print("Enter Password:")
|
fmt.Print("Enter Password:")
|
||||||
bytepw, err := term.ReadPassword(int(syscall.Stdin))
|
bytepw, err := term.ReadPassword(int(syscall.Stdin))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Println("\n")
|
||||||
return nil, fmt.Errorf("Reading Password: %w", err)
|
return nil, fmt.Errorf("Reading Password: %w", err)
|
||||||
}
|
}
|
||||||
userPassword = string(bytepw)
|
userPassword = string(bytepw)
|
||||||
|
fmt.Println("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
client, err := api.NewClient(nil, "", serverAddress, userPrivateKey, userPassword)
|
client, err := api.NewClient(nil, "", serverAddress, userPrivateKey, userPassword)
|
||||||
|
|
Loading…
Add table
Reference in a new issue