Skip to content

Commit

Permalink
login - allow to pass not all options and prompt for the other ones (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
iignatevich authored Apr 12, 2024
1 parent 6dd892e commit 65101a1
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,12 +206,9 @@ func buildNotFoundError(item, template string, err error) error {

func login(k Keyring, creds CredentialsItem) error {
// Ask for login elements if some elements are empty.
var err error
if creds == (CredentialsItem{}) {
err = RequestCredentialsFromTty(&creds)
if err != nil {
return err
}
err := RequestCredentialsFromTty(&creds)
if err != nil {
return err
}

err = k.AddItem(creds)
Expand Down

0 comments on commit 65101a1

Please sign in to comment.