Skip to content

Misleading error message when entry script is present but not executable #1159

@nixjdm

Description

@nixjdm

Hi! I'm getting acquainted with pre-commit (I love it by the way). I tried adding a prepare-commit-msg script with

-   repo: local
    hooks:
      - id: some-id
        name: Some Name
        stages: [prepare-commit-msg]
        entry: ./bin/prepare-commit-msg.sh
        language: script

At first I neglected to chmod +x bin/prepare-commit-msg.sh, so when I tried it out, I got the message

Executable `[path]/bin/prepare-commit-msg.sh` not found

The file was present, it just wasn't marked executable. I squinted for a short while looking for a typo somewhere before realizing my mistake.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions