m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard Towers <richard.towers@digital.cabinet-office.gov.uk>2021-06-11 18:39:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-06-11 18:39:37 +0200
commita271b43cbd76cc30406202c49041b552656538bd (patch)
tree58bb3b028a0c04e9ab82f2ff7da939aab89f4990 /src
parentff5ac38f7984d7b3d2912dba106baa2fed52e530 (diff)
Strip comments in gpg-id files
Diffstat (limited to 'src')
-rwxr-xr-xsrc/password-store.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 77f3eda..2b2d208 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -100,6 +100,8 @@ set_gpg_recipients() {
local gpg_id
while read -r gpg_id; do
+ gpg_id="${gpg_id%%#*}" # strip comment
+ [[ -n $gpg_id ]] || continue
GPG_RECIPIENT_ARGS+=( "-r" "$gpg_id" )
GPG_RECIPIENTS+=( "$gpg_id" )
done < "$current"