Skip to content

Commit f0d72a0

Browse files
committed
Add note about pathspec error
1 parent 571d6b7 commit f0d72a0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,14 @@ If you go the "force pushes" route, you have to enable force pushes to a protect
399399

400400
This is due to limitations set up by GitHub, [commits of this Action do not trigger new Workflow runs](#commits-of-this-action-do-not-trigger-new-workflow-runs).
401401

402+
### Pathspec 'x' did not match any files
403+
404+
If you're using the Action with a custom `file_pattern` and the Action throws a fatal error with the message "Pathspec 'file-pattern' did not match any files", the problem is probably that no file for the pattern exists in the repository.
405+
406+
`file_pattern` is used both for `git-status` and `git-add` in this Action. `git-add` will throw a fatal error, if for example, you use a file pattern like `*.js *.ts` but no `*.ts` files exist in your projects repository.
407+
408+
See [Issue #227](https://github.com/stefanzweifel/git-auto-commit-action/issues/227) for details.
409+
402410
## Running the tests
403411

404412
The Action has tests written in [bats](https://github.com/bats-core/bats-core). Before you can run the test suite locally, you have to install the dependencies with `npm` or `yarn`.

0 commit comments

Comments
 (0)