paths-filter icon indicating copy to clipboard operation
paths-filter copied to clipboard

Error: Unable to locate executable file: git.

Open dataaxleandy opened this issue 1 year ago • 4 comments

I'm receiving the following error when trying to use this action. The directory specified by the PATH environment variable is a git repo.

Run dorny/paths-filter@v2 Get current git ref Error: Unable to locate executable file: git. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

- uses: dorny/paths-filter@v2
      id: filter
      with:
        filters: |
          main-site:
            - './backend/projects/path1/path2/build-files/**'
          lp-site:
            - './backend/projects/path1/path2/build-files-lp/**'
        working-directory: './'

The working directory is the location where the git checkout occurs. I've tried multiple variations of the path to see if it would work, but so far nothing does.

dataaxleandy avatar Jul 25 '22 16:07 dataaxleandy

same here

xcfw avatar Sep 13 '22 07:09 xcfw

As a workaround you can use this:

      - uses: actions/checkout@v3
      - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50

where 4512585405083f25c027a35db413c2b3b9006d50 is jus commit hash of 2.11.1 release

ddeath avatar Nov 10 '22 11:11 ddeath

As a workaround you can use this:

      - uses: actions/checkout@v3
      - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50

where 4512585405083f25c027a35db413c2b3b9006d50 is jus commit hash of 2.11.1 release

Thank you @ddeath! This worked for me.

injectedfusion avatar Nov 30 '22 18:11 injectedfusion

This is my action and I still get this error:

    - name: Check for Changed Files
        uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50
        id: filter
        with:
          filters: |
            rust:
              - '**/*.rs'
              - '**/Cargo.toml'
              - '**/Cargo.lock'
            js-api-augment:
              - "js/api-augment/**"
              - '**/Cargo.toml'
              - '**/Cargo.lock'
            ci-base-image:
              - 'tools/ci/docker/ci-base-image.dockerfile'

demisx avatar May 04 '23 23:05 demisx