fix import keys hook using unbound variable

This commit is contained in:
0x5a4 2025-01-26 21:56:46 +01:00 committed by Jörg Thalheim
parent 015d461c16
commit 4c1251904d

View file

@ -1,6 +1,6 @@
sopsImportKeysHook() {
local key dir
if [ -n "${sopsCreateGPGHome}" ]; then
if [ -v sopsCreateGPGHome ] && [ -n "${sopsCreateGPGHome}" ]; then
export GNUPGHOME=${sopsGPGHome:-$(pwd)/.git/gnupg}
mkdir -m 700 -p $GNUPGHOME
fi