From 5c532bdb11d608f1e87ab1fee1560c668634df2a Mon Sep 17 00:00:00 2001 From: Kyle Squizzato Date: Thu, 1 May 2025 15:29:47 -0700 Subject: [PATCH] fix: Action now parses "\" line seperator Signed-off-by: Kyle Squizzato --- action.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 8edf47b..99298ae 100644 --- a/action.yml +++ b/action.yml @@ -79,13 +79,23 @@ runs: INPUT_MODULE: ${{ inputs.module }} run: | tmpout=$(mktemp) - cd ${{ inputs.workdir }} && { \ + cd ${{ inputs.workdir }} + + # Preprocess args: replace backslash-newline with space, then split into array + if [[ -n "${{ inputs.args }}" ]]; then + ARGS=$(echo "${{ inputs.args }}" | awk '{sub(/[ \t]*\\$/, ""); printf "%s", $0; if (!/[ \t]*\\$/) print ""}') + read -r -a ARGS_ARRAY <<< "$ARGS" + else + ARGS_ARRAY=() + fi + DAGGER_CLOUD_TOKEN=${{ inputs.cloud-token }} \ dagger \ ${{ inputs.dagger-flags }} \ ${{ inputs.verb }} \ ${INPUT_MODULE:+-m $INPUT_MODULE} \ - ${{ inputs.args || inputs.call }}; } | tee "${tmpout}" + "${ARGS_ARRAY[@]}" \ + ${{ inputs.call }} | tee "${tmpout}" { # we need a delim that doesn't appear in the output - a hash of the