Skip to content

issues with argument parsing #8

Description

@ryanong

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[@]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions