Skip to content

Input documentation is incomplete around pathspec errors #705

Description

@tomas-kovanda

The issue

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

  1. added a commit that references this issue on Nov 27, 2025
    c63e8db
  2. added a commit that references this issue on Nov 30, 2025
    750bd4c
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

    status: pendingMore info is needed before deciding what to do

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions