EndBug/add-and-commit

"add" with array input doesn't seem to work

yaakov-h opened this issue · 3 comments

Describe the bug
When using "add" with multiple inputs as a JSON or YAML array, it logs an error and does not add any files.

Workflow used
YAML array (multiline list): pyconau/2023-website@0f778f1
JSON array (single line): pyconau/2023-website@d3f7248

Expected behavior
Multiple invocations of git add would be run to add multiple directories to the git staging area

Logs
https://github.com/pyconau/2023-website/actions/runs/5878006660/job/15939224675

Error: Error: fatal: pathspec '-' did not match any files

https://github.com/pyconau/2023-website/actions/runs/5878046329/job/15939335610

Error: Error: fatal: pathspec '["public/people",' did not match any files

Hi, I see that you're using an old version of the action: can you update to the latest one and try again?
You can find all breaking changes in the release notes ;)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If anyone else ends up here because they are confused...

The add data is a multiline string interpreted as a YAML array, like OP tried. The problem is OP used a very old version (v5.3.0) while arrays has been supported since v6.