From 3147a951e6f1f72d4d7faabe753846d603c5a0e2 Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:41:13 +0100 Subject: [PATCH] fix: skip empty files --- entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 9906b49..2b87579 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -46,6 +46,11 @@ IFS=$(echo -en "\n\b") run_langtool() { for FILE in ${FILES}; do echo "Checking ${FILE}..." >&2 + # Skip empty files + if [ ! -s "${FILE}" ]; then + echo "Skipping empty file: ${FILE}" >&2 + continue + fi curl --silent \ --request POST \ --data "${DATA}" \