diff --git a/pkgs/clerie-sops/clerie-sops-edit.sh b/pkgs/clerie-sops/clerie-sops-edit.sh index 2e03185..7e03445 100755 --- a/pkgs/clerie-sops/clerie-sops-edit.sh +++ b/pkgs/clerie-sops/clerie-sops-edit.sh @@ -52,7 +52,7 @@ DECRYPT_ERROR_FILE="$(mktemp)" 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 - 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}" exit 1 fi