You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
init writes a workflow that splits a tests directory containing a space #1425
bashunit init "my tests" writes a workflow that runs the wrong paths in CI. The generated .github/workflows/tests.yml has:
- uses: TypedDevs/bashunit@v0with:
args: my tests
The action splits args on whitespace on purpose (action.yml:76-80, "$target_dir/bashunit" $BASHUNIT_ARGS), so CI runs bashunit my tests: two paths, my and tests, neither of which is the test directory.
Where
src/cli/init.sh: the workflow heredoc writes args: $tests_dir as is.
action.yml:76-80: $BASHUNIT_ARGS is split on purpose so callers can pass several arguments in one string. Quoting the value in YAML does not help, because quotes inside the string are not parsed again.
Why it matters
#1411 (PR #1424) makes a directory with a space work locally. The workflow from the same init run still breaks on the first push.
Options
Have init refuse a directory name that contains whitespace, with a clear message.
For such a name, write the workflow without the directory and rely on BASHUNIT_DEFAULT_PATH in .env. This only works when .env is committed, which many projects avoid.
Add an action input that takes one path without splitting it, and have init use it.
Acceptance criteria
After bashunit init "my tests", the generated workflow runs the tests in my tests/, or init refuses the name before writing any file.
A directory without spaces produces the same workflow as today.
Activity