Skip to content

Commit

Permalink
properly send arguments into command
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanong authored Dec 28, 2022
1 parent 63e45cd commit 5c25b05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5c25b05

Please sign in to comment.