On Mon, Apr 21, 2014 at 3:56 AM, Von Welch <[email protected]> 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, remember? But to please your tests, I made this change: http://git.zx2c4.com/password-store/commit/?id=07bcfccebfa2f885849f0b8698a496c3c757d8a7 > > ... > >> 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.
_______________________________________________ Password-Store mailing list [email protected] http://lists.zx2c4.com/mailman/listinfo/password-store
