Skip to content

[Bug]: Claude hooks broken by Windows line endings #832

@kimsey0

Description

@kimsey0

Contact Details

No response

Detailed description?

Describe the bug
On Windows, the Claude Code hooks in .claude/hooks are checked out with Windows line endings (\r\n) by default if core.autocrlf=true is enabled due to


This prevents Claude Code from running the hooks:

Screenshot showing Claude Code running hooks and failing due to Windows line endings

Expected behavior
Shell scripts should probably be checked out with Unix line endings by default, or at least the ones used as Claude Code hooks:

# Shell scripts must use LF line endings (even on Windows)
*.sh text eol=lf

Severity

Low

Is this bug security related?

  • This bug is related to security

Code of Conduct

  • I agree to follow this project's Code of Conduct

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