1
0

pkgs/clerie-sops: Remove unnecessary use of cat

This commit is contained in:
clerie 2024-05-12 14:42:55 +02:00
parent d22a3d447b
commit edabc9e892

View File

@ -52,7 +52,7 @@ DECRYPT_ERROR_FILE="$(mktemp)"
if ! clerie-sops --decrypt --extract "${KEY_SELECTOR}" "${SECRETS_FILE}" > "${TMP_FILE}" 2> "${DECRYPT_ERROR_FILE}"; then if ! clerie-sops --decrypt --extract "${KEY_SELECTOR}" "${SECRETS_FILE}" > "${TMP_FILE}" 2> "${DECRYPT_ERROR_FILE}"; then
# Ignore that the key does not exist, but fail for all other errors # Ignore that the key does not exist, but fail for all other errors
if ! cat "${DECRYPT_ERROR_FILE}" | grep -q "component .* not found"; then if ! grep -q "component .* not found" "${DECRYPT_ERROR_FILE}"; then
cat "${DECRYPT_ERROR_FILE}" cat "${DECRYPT_ERROR_FILE}"
exit 1 exit 1
fi fi