From 2ce6ea9561611260de79163be9b68357909c543d Mon Sep 17 00:00:00 2001 From: Ryan Ong Date: Wed, 28 Dec 2022 11:03:24 -0500 Subject: [PATCH] properly send arguments into command --- action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 3c361af..89961f4 100644 --- a/action.yml +++ b/action.yml @@ -44,21 +44,21 @@ 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" + SPLIT_BY=("-line-count") else echo "No split type arguments set. Using default" - SPLIT_BY="" + SPLIT_BY=() fi - EXCLUDE_GLOB="" + EXCLUDE_GLOB=() if [ -n "${{ inputs.exclude-glob }}" ]; then - EXCLUDE_GLOB="-exclude-glob='${{ inputs.exclude-glob }}'" + 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}) + TESTS=$(./split_tests ${SPLIT_BY[@]} -split-index=${{ inputs.split-index }} -split-total=${{ inputs.split-total }} -glob='${{ inputs.glob }}' ${EXCLUDE_GLOB[@]}) echo $TESTS