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
Input documentation is incomplete around pathspec errors #705
After noticing that my action run looked successful despite my pathspec not matching any files and this action even logging an error, I read the "Adding files" section which at the time of writing reads
The action adds files using a regular git add command, so you can put every kind of argument in the add option. For example, if you want to force-add a file: ./path/to/file.txt --force. The script will not stop if one of the git commands doesn't match any file. E.g.: if your command shows a "fatal: pathspec 'yourFile' did not match any files" error the action will go on.
You can also use JSON or YAML arrays (e.g. '["first", "second"]', "['first', 'second']") to make the action run multiple git add commands: the action will log how your input has been parsed. Please mind that your input still needs to be a string because of how GitHub Actions works with inputs: just write your array inside the string, the action will parse it later.
Especially the highlighted sentence made me believe that's just the intended behaviour and I have to deal with it. And I stopped looking further. Someone else wrote the workflow, so I never studies this action and only later noticed the pathspec_error_handling input.
Suggestion
I think if the documentation mentions the option to override the pathspec error behaviour, this would make it clearer prevent similar cases of confusion. I'll submit a PR for this.
Activity
Clarify pathspec error behavior can be configured
Improve documentation around pathspec error behavior (EndBug#706)