pacman-key: when refreshing gpg.conf, don't truncate option checking
If an option is a two-part option, we print both (separated by IFS=' '), but when grepping to see if it already exists, we only checked the first component. This means that something like keyserver-options could only check if there were existing keyserver options of any sort, but not which ones. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
6d99a15f0b
commit
45e01e55c9
1 changed files with 1 additions and 1 deletions
|
@ -169,7 +169,7 @@ add_gpg_conf_option() {
|
||||||
local conffile=$1; shift
|
local conffile=$1; shift
|
||||||
# looking for the option 'bare', only leading spaces or # chars allowed,
|
# looking for the option 'bare', only leading spaces or # chars allowed,
|
||||||
# followed by at least one space and any other text or the end of line.
|
# followed by at least one space and any other text or the end of line.
|
||||||
if ! grep -q "^[[:space:]#]*$1\([[:space:]].*\)*$" "$conffile" &>/dev/null; then
|
if ! grep -q "^[[:space:]#]*$*\([[:space:]].*\)*$" "$conffile" &>/dev/null; then
|
||||||
printf '%s\n' "$*" >> "$conffile"
|
printf '%s\n' "$*" >> "$conffile"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue