[PATCH] Add missing local variable declaration

Axel Tripier axel at tripier.fr
Fri Jul 2 16:56:38 UTC 2021


Note: the declaration `local gpg_id` is repeated later in the function
`set_gpg_recipients()`, so I don't know if you want to have it in two
places (like in this patch) or in a single declaration at the top of the
function (and remove it from later in the function).
---
 src/password-store.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/password-store.sh b/src/password-store.sh
index a0dcf2e..79b7c72 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -72,6 +72,7 @@ set_gpg_recipients() {
 	GPG_RECIPIENTS=( )
 
 	if [[ -n $PASSWORD_STORE_KEY ]]; then
+		local gpg_id
 		for gpg_id in $PASSWORD_STORE_KEY; do
 			GPG_RECIPIENT_ARGS+=( "-r" "$gpg_id" )
 			GPG_RECIPIENTS+=( "$gpg_id" )
-- 
2.31.1


More information about the Password-Store mailing list