Don't base pass-otp availability decision on hardcoded /usr/lib #499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
/usr/lib
does not exist in various Linux distributions, nor does it work if you have installed your qtpass to a custom prefix such as/usr/local
or into your home directory.Disable this check for now, so that the OTP functionality can be enabled in such cases.
As a result,
ConfigDialog::isPassOtpAvailable()
now only has the functionality to returnfalse
on platforms where the OTP functionality is certainly not supported.CC @FiloSpaTeam as the author of 5fc6c65 (via #407); also mentioning #394 and #327 so that this PR shows up there for others that, like me, searched for this problem.
A better future detection logic might be to run
pass otp --version
and check if that succeeds, but I'm not doing that here because it's more sophisticated and I'd like qtpass to work well withpass-otp
for all users as soon as possible.