-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Distinct exit code for invalid master password #104
Comments
Wow that was quick, thanks @hazcod! Quick question: if I provide an invalid master password (with keyfile) I don't get the message |
Ohh, my mistake in being too fast. |
I guess the problem is a different one now: why doesn't it in my case (pw+keyfile) fail already within Can you reproduce this issue or do you have a clue what could be the cause? I'd be happy to provide a PR if I knew how to solve it. |
I was thinking the same thing, when looking at https://github.com/hazcod/enpass-cli/blob/master/pkg/enpass/vault.go#L131 |
@hazcod I've found the issue, opened a PR with a solution for this. |
@msladek ahh that makes sense, thank you for the work! Closing. |
Hey there, firstly thanks a lot for the tool, it is very helpful when working mostly with CLI.
I recently noticed while incorporating
enpasscli
in some bash scripts that all non-successful exits return1
, e.g. when unable tocopy
because the card wasn't found:However it would be useful to have distinct exit code for providing an invalid master password. Currently it also returns
1
:Now I'm not at all familiar with golang, but if I'm not mistaken we'd simply need to add e.g.
os.Exit(2)
in the error checks after getting the entries from the vault. I guess that'd be sufficient for my needs at least.WDYT?
The text was updated successfully, but these errors were encountered: