Skip to content

Don't suggest chmod +/-x on Windows #686

@jmerdich

Description

@jmerdich

Some of the executable error messages suggest using chmod +/-x to toggle the executable bits. This works fine on *nix, but not on windows, and the results range from 'command not found' to doing nothing at all.

Eg: https://github.com/pre-commit/pre-commit-hooks/blob/master/pre_commit_hooks/check_executables_have_shebangs.py#L66

Instead, this should recommend git add --chmod=+/-x somepath when the hook detects it's running on windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions