Skip to content

pathspec 'x' did not match any files #227

@staabm

Description

@staabm

Version of the Action
v4

Describe the bug
In a workflow, which sometimes changes x.neon or x.dba.cache files, I am running into the following error:

Started: bash /home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/entrypoint.sh
INPUT_REPOSITORY value: .
INPUT_STATUS_OPTIONS: 
INPUT_BRANCH value: 
From https://github.com/complex-gmbh/php-backend-cms
 * [new branch]      master     -> origin/master
 * [new branch]      target-php -> origin/target-php
M	composer.json
M	phpstan-baseline.neon
Your branch is up to date with 'origin/create-pull-request/patch'.
INPUT_ADD_OPTIONS: 
INPUT_FILE_PATTERN: *.neon *dba.cache
fatal: pathspec '*dba.cache' did not match any files
Error: Invalid status code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:[19](https://github.com/complex-gmbh/php-backend-cms/runs/7088745613?check_suite_focus=true#step:14:20))
    at ChildProcess.emit (events.js:314:[20](https://github.com/complex-gmbh/php-backend-cms/runs/7088745613?check_suite_focus=true#step:14:21))
    at maybeClose (internal/child_process.js:10[22](https://github.com/complex-gmbh/php-backend-cms/runs/7088745613?check_suite_focus=true#step:14:23):16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:[28](https://github.com/complex-gmbh/php-backend-cms/runs/7088745613?check_suite_focus=true#step:14:29)7:5) {
  code: 128
}
Error: Invalid status code: 128
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/v4/index.js:17:19)
    at ChildProcess.emit (events.js:[31](https://github.com/complex-gmbh/php-backend-cms/runs/7088745613?check_suite_focus=true#step:14:32)4:20)
    at maybeClose (internal/child_process.js:1022:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)

I am wondering that the pathspec is handled as required files.. we don't generate this files every time.. so I didn't expect this error

To Reproduce
.

Expected behavior
No error, since the pattern matched at least one of the path specs

Screenshots
If applicable, add screenshots to help explain your problem.

Used Workflow

      - name: Commit changed files
        if: "github.event_name == 'repository_dispatch'"
        uses: stefanzweifel/git-auto-commit-action@v4
        with:
          commit_message: Apply phpstan-baseline changes
          branch: ${{ github.head_ref }}
          file_pattern: '*.neon *dba.cache'

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions