From 493d405cabf9d73b7891a8e9f9071fcb30d90335 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Van=C4=8Dura?= Date: Wed, 5 Feb 2025 10:55:02 +0100 Subject: [PATCH] Actor: Fix quoting in `DOC_CONVERT_CMD` variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Vančura --- .actor/actor.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.actor/actor.sh b/.actor/actor.sh index 1ec97ffd..1df11f59 100755 --- a/.actor/actor.sh +++ b/.actor/actor.sh @@ -68,7 +68,7 @@ fi # --- Build Docling command --- -DOC_CONVERT_CMD="docling --verbose \"${DOCUMENT_URL}\" --to \"${OUTPUT_FORMAT}\"" +DOC_CONVERT_CMD="docling --verbose '${DOCUMENT_URL}' --to '${OUTPUT_FORMAT}'" # If OCR is enabled, add the OCR flag to the command. if [ "$(echo "${INPUT}" | jq -r '.ocr')" = "true" ]; then @@ -92,7 +92,7 @@ touch "$TIMESTAMP_FILE" || { } echo "Starting document processing with memory monitoring..." -/usr/bin/time -v bash -c "$DOC_CONVERT_CMD" 2>&1 | tee -a "$LOG_FILE" +/usr/bin/time -v bash -c "${DOC_CONVERT_CMD}" 2>&1 | tee -a "$LOG_FILE" DOCLING_EXIT_CODE=${PIPESTATUS[0]} # Check if the command failed and handle the error.