Keep secrets when decryption is impossible

This commit is contained in:
Alexander Bantyev 2021-09-12 20:14:11 +03:00
parent 26c8ed0c05
commit ab62941eb3
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5

View File

@ -65,7 +65,12 @@ let
else else
echo "Failed to decrypt the secret" echo "Failed to decrypt the secret"
rm '${decrypted}.tmp' rm '${decrypted}.tmp'
exit 1 if [[ -f '${decrypted}' ]]; then
echo "The decrypted file exists anyways, not failing"
exit 0
else
exit 1
fi
fi fi
''; '';