diff options
author | Allan McRae <allan@archlinux.org> | 2011-09-30 05:40:00 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-09-30 17:48:19 +0200 |
commit | 07ecd40a1a1ffba5e5b1c3edd199a0f159496c48 (patch) | |
tree | 332897019462a3f7d96091ec06ba5ac6691cd89d /scripts/pacman-key.sh.in | |
parent | 6dfb9d35f8601c3752dc5bd0e8558c48f41a8215 (diff) | |
download | pacman-07ecd40a1a1ffba5e5b1c3edd199a0f159496c48.tar.gz pacman-07ecd40a1a1ffba5e5b1c3edd199a0f159496c48.tar.xz |
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>
Diffstat (limited to 'scripts/pacman-key.sh.in')
-rw-r--r-- | 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 86429285..e293d496 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 } |