Open eklitzke opened 3 years ago
Duplicate of #116
Thank you for pointing to the #116
The underlying issue is that script fails if otptool
is not found in the system. In my case, I have been unable to install it in RHEL8, and found nothing googling about it.
Is there any way to make otptool available so the otp.bash script doesn't fail in the which
statement? Is there any other option, taking into account that the script seems to work without it?
@tadfisher as I can tell by https://github.com/tadfisher/pass-otp/pull/116#issuecomment-691537592 I see you're against using command -v
over which
, but would you accept a change which would at least suppress all the error messages caused by which
?
These are really annoying and while I still think command -v
is 100% the way to go (even upstream pass relies on it and uses it), I'd want to have any sort of half-solution to this problem.
I upgraded to a more recent version of otp.bash and now I'm getting an error message like this preceding my otp output:
This fixes the issue by using
command -v
instead ofwhich
; it's also possible to fix this by redirecting which stderr to/dev/null
, but usingcommand
instead ofwhich
is better anyway becausecommand
is a bash builtin.