From d2484baf14946755aad23fb1c564e7e5ed0640e0 Mon Sep 17 00:00:00 2001 From: Ryan Ong Date: Thu, 12 Jan 2023 12:45:38 -0500 Subject: [PATCH] go argument parsing is broken as hell --- action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 3c361af..4baf1cc 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,7 @@ runs: # setup split type if [ -n "${{ inputs.junit-path }}" ]; then echo "junit-path set. Splitting based on JUnit timings" - SPLIT_BY="-junit -junit-path=${{ inputs.junit-path }}" + SPLIT_BY="-junit -junit-path='${{ inputs.junit-path }}'" elif [ -n "${{ inputs.line-count }}" ]; then echo "line-count set. Splitting based on test line count" SPLIT_BY="-line-count" @@ -58,7 +58,9 @@ runs: EXCLUDE_GLOB="-exclude-glob='${{ inputs.exclude-glob }}'" fi - TESTS=$(./split_tests ${SPLIT_BY} -split-index=${{ inputs.split-index }} -split-total=${{ inputs.split-total }} -glob='${{ inputs.glob }}' ${EXCLUDE_GLOB}) + COMMAND="./split_tests $SPLIT_BY -split-index=${{ inputs.split-index }} -split-total=${{ inputs.split-total }} -glob='${{ inputs.glob }}' $EXCLUDE_GLOB" + + TESTS=$(eval $COMMAND) echo $TESTS