fix detection of gpg recipient id validity

This commit is contained in:
Jaromil 2022-04-13 15:46:35 +02:00
parent 70871108a8
commit 63bfc4dec6

2
tomb
View File

@ -969,7 +969,7 @@ is_valid_recipients() {
for gpg_id in ${recipients[@]}; do for gpg_id in ${recipients[@]}; do
trust="$(gpg --with-colons --batch --list-keys "$gpg_id" 2> /dev/null | trust="$(gpg --with-colons --batch --list-keys "$gpg_id" 2> /dev/null |
awk 'BEGIN { FS=":" } /^pub/ { print $2; exit}')" awk 'BEGIN { FS=":" } /^pub/ { print $2; exit}')"
[[ $? != 0 ]] && { [[ "${trust}" == "" ]] && {
_warning "Not a valid GPG key ID: ::1 gpgid:: " $gpg_id _warning "Not a valid GPG key ID: ::1 gpgid:: " $gpg_id
return 1 return 1
} }