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@docker:~$ pass init 1024D/6AC43D77
mkdir: created directory '/home/ubuntu/.password-store/'
Password store initialized for 1024D/6AC43D77
ubuntu@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@docker:~$ echo $?
0
ubuntu@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
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to