1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

pacman-key: return 0 from get_from if default value used

This prevents the error trap being set off when GPGDir is commented
in pacman.conf.  Bug introduced in 507b01b9.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2011-09-30 13:40:00 +10:00 committed by Dan McGee
parent 6dfb9d35f8
commit 07ecd40a1a

View File

@ -106,7 +106,10 @@ get_from() {
return 0
fi
done < "$1"
printf '%s\n' "$3"
if [[ -n "$3" ]]; then
printf '%s\n' "$3"
return 0
fi
return 1
}