split_tests
split_tests copied to clipboard
issues with argument parsing
So I'm writing some scripts and for some reason argument parsing is really difficult.
So looking at this code https://github.com/chaosaffe/split-tests/blob/main/action.yml#L61 for some reason the environment variables aren't parsed correctly. Specifically $EXCLUDE_GLOB
I have to eval them like this https://github.com/ryanong/split-tests/blob/patch-1/action.yml#L61 in order for the arguments to get consumed correctly. I have tried turning the arguments into a bash array but to application still messes up.
example broken code of array
ARGS=("--split-index=0" "--split-total=3" "--glob='spec/**/*_spec.rb'" "--junit" "--junit-path='report-tmp/rspec-*.xml'" "--exclude-glob='spec/features/**/*_spec.rb'")
echo $ARGS[@]
./split_tests $ARGS[@]