[pass] 'pass insert' bugs

Jason A. Donenfeld Jason at zx2c4.com
Tue Apr 22 13:53:34 CEST 2014

On Mon, Apr 21, 2014 at 3:56 AM, Von Welch <von at vwelch.com> wrote:
> You fixed the interactive case, but the following now hangs if the
> password does not exist:
> % echo "foo" | ../src/password-store.sh insert my-pass
> (It also points out a shortcoming of sharness.sh, which is it doesn't
> support any timeouts on tests that I can see.)

Yes. I have it ask again if we get an EOF (or CTRL+D). It's interactive,

But to please your tests, I made this change:

> ...
>> Seems to be the desired behavior, since you don't have to enter the
>> password twice in -e mode, right?
> I suggest that returning a non-zero status but not printing an error
> message is a bug. If a user isn't explicitly checking the return status
> (it's obvious to me because my prompt prints it), they could easily miss
> the failure.

It returns 1 and exits because there's a prompt that says "override this
file?" and your echo input is "foo", which is not "Y". Use -f in your tests
if you'd like to avoid this. Or account for sending "y\n" if it exists.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20140422/b67b7162/attachment.html>

More information about the Password-Store mailing list