pass doesn't exit 1 when encryption fails

Jason A. Donenfeld Jason at zx2c4.com
Thu Aug 17 20:47:08 CEST 2017


Nice catch! On holiday now but will fix this when home

Thanks,
Jason

On Aug 16, 2017 23:21, "Tycho Andersen" <tycho at docker.com> wrote:

> Hi all,
>
> In some cases (e.g. when there is a pub key missing), gpg prints an error
> to stderr, but pass doesn't seem to exit 1:
>
> ubuntu at docker:~$ pass init 1024D/6AC43D77
> mkdir: created directory '/home/ubuntu/.password-store/'
> Password store initialized for 1024D/6AC43D77
> ubuntu at docker:~$ pass insert -f -m foo/bar
> mkdir: created directory '/home/ubuntu/.password-store/foo'
> Enter contents of foo/bar and press Ctrl+D when finished:
>
> gpg: 1024D/6AC43D77: skipped: No public key
> gpg: [stdin]: encryption failed: No public key
> ubuntu at docker:~$ echo $?
> 0
> ubuntu at docker:~$ ls -al .password-store/foo/
> total 8
> drwx------ 2 ubuntu ubuntu 4096 Aug 16 23:14 .
> drwx------ 3 ubuntu ubuntu 4096 Aug 16 23:14 ..
>
> The foo directory is created, but the password is not inserted. It seems
> that at least pass should exit 1 if it failed, but maybe also it should
> delete foo, since there's nothing in that directory?
>
> Cheers,
>
> Tycho
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20170817/dafa7b97/attachment.html>


More information about the Password-Store mailing list