[pacman-dev] [PATCH] pacman-key: return 0 from get_from if default value used
30 Sep
2011
30 Sep
'11
3:41 a.m.
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> --- scripts/pacman-key.sh.in | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/scripts/pacman-key.sh.in b/scripts/pacman-key.sh.in index 8642928..e293d49 100644 --- a/scripts/pacman-key.sh.in +++ b/scripts/pacman-key.sh.in @@ -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 } -- 1.7.6.4
4840
Age (days ago)
4840
Last active (days ago)
0 comments
1 participants
participants (1)
-
Allan McRae