Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter by username to return nothing when no match #70

Open
siimkaba opened this issue Feb 13, 2023 · 2 comments
Open

Filter by username to return nothing when no match #70

siimkaba opened this issue Feb 13, 2023 · 2 comments
Labels
good first issue Good for newcomers

Comments

@siimkaba
Copy link

I would like to avoid returning "arbitrary" first password when using in scripts.

diff --git a/src/main.rs b/src/main.rs
index 377fcc0..7595194 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -587,6 +587,8 @@ where
                 login_entries_name_matches.len()
             );
             login_entries = login_entries_name_matches;
+        } else {
+            return Err(anyhow!("No matching logins found"));
         }
     }
     if login_entries.len() > 1 {

Not sure is it a bug or UC for something?

@Frederick888
Copy link
Owner

Frederick888 commented Feb 14, 2023 via email

@Frederick888 Frederick888 added the good first issue Good for newcomers label Feb 14, 2023
@siimkaba
Copy link
Author

siimkaba commented Mar 8, 2023

And out of curiosity, what
is your use case, where you seem to have more than one entry that's got
the same URI, and you have to rely on username solely to pin down the
entry you want?

I am using it for scripting, there I want to get back concrete single result or error in case of my typo or missing record in keepassxc store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants