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

Lack of error handling on "pass" commands #173

Open
justinsteven opened this issue Jul 14, 2019 · 0 comments
Open

Lack of error handling on "pass" commands #173

justinsteven opened this issue Jul 14, 2019 · 0 comments
Assignees

Comments

@justinsteven
Copy link

rofi-pass does not check the exit status of pass, which hides failures from the caller of rofi-pass.

This would be useful for things that wrap rofi-pass. The wrapper could take some action upon detecting a failure of rofi-pass - for example, send a notification to the user's notification daemon.

Observed behaviour

For example, if my PGP key is unavailable, then pass show results in an exit status of 2:

% pass insert test_pass
Enter password for test_pass:
Retype password for test_pass:

% pass show test_pass
gpg: decryption failed: No secret key

% echo $?
2

However, doing rofi-pass and choosing the same password from the list of passwords results in an exit code of 0:

% rofi-pass
gpg: decryption failed: No secret key

% echo $?
0

(nb. I have my rofi-pass configured with default_do='typePass')

Expected behaviour

If pass returns a non-zero exit status, then rofi-pass should:

  1. Consider whether it should continue execution or bail out
  2. Return the same non-zero exit status, or its own non-zero exit status
@carnager carnager self-assigned this Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants