Skip to content

pre-commit failing in Github Actions within setup.cfg file #112

Closed

Description

@vatanaksoytezer

We are happily using pre-commit all over ros-planning repos for some time. Today @JafarAbdi and I got a failing pre-commit CI when we've added a setup.cfg file to one of our repos. The error we are getting from Github Actions is:

Error: Unable to locate executable file: pre-commit. 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.

I've tracked this to a one single line in my own fork here vatanaksoytezer/srdfdom#3. pre-commit CI passes before that particular line but starts to fail with the error above. For more information:

Last passing CI: https://github.com/vatanaksoytezer/srdfdom/actions/runs/965983045
Failing CI: https://github.com/vatanaksoytezer/srdfdom/pull/3/checks?check_run_id=2899733955

I appreciate if you have any insights / thoughts on this.

Activity

  1. asottile commented on Jun 23, 2021

    @asottile
    Member

    I'd recommend not using install-scripts -- it's not doing what you intend it to do and breaking how pip works

    note that https://pre-commit.ci will not have this problem as it does not install using your repository so I'd recommend using that instead

  2. vatanaksoytezer commented on Jun 23, 2021

    @vatanaksoytezer
    Author

    Follow up question: Just tried https://pre-commit.ci but I couldn't seem to run the CI on different branches other than my main branch? Am I missing something?

  3. asottile commented on Jun 23, 2021

    @asottile
    Member

    it runs on pull requests and the default branch

  4. vatanaksoytezer commented on Jun 23, 2021

    @vatanaksoytezer
    Author

    Is there any way we can run it on other branches as well? I am also happy to contribute these stuff. We (and many other ROS organizations) typically support multiple ROS distributions on different branches in our repos and run CIs against each branch.

  5. asottile commented on Jun 23, 2021

    @asottile
    Member

    not currently besides having it in PRs to those branches

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions