Skip to content

check-executables-have-shebangs Should Check Executable Bit According to Git Rather Than File System #690

Description

@Kurt-von-Laven

Running check-executables-have-shebangs from WSL (e.g., Ubuntu) on the Windows file system results in "marked executable but has no (or invalid) shebang!" for every file without a shebang. In this (and every other) situation, one could instead parse the output of git ls-tree to determine which files are executable. Another option would be to run git add --chmod=-x on all files without a shebang, which should work on both Windows and Linux, but would change the behavior of the hook from read-only to auto-fix, and has the drawback of being anti-helpful when the file was supposed to be marked executable but was lacking a shebang.

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