grubby-bls: don't print rpm-sort error messages

If there are no BLS snippets, an empty array of strings is passed to the
rpm-sort tool and it will print an error that just confuses grubby users.

Resolves: rhbz#1731924

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2019-11-22 14:59:58 +01:00
parent 9baffd002d
commit 77a8c0bcac
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -92,7 +92,7 @@ get_bls_values() {
bls="${bls%.conf}"
bls="${bls##*/}"
echo "${bls}"
done | /usr/libexec/grubby/rpm-sort -c rpmnvrcmp | tac)) || :
done | /usr/libexec/grubby/rpm-sort -c rpmnvrcmp 2>/dev/null | tac)) || :
for bls in "${files[@]}" ; do
blspath="${blsdir}/${bls}.conf"