Skip to content

🐛 Knip fails in a git worktree + lefthook #990

Open
@VanTanev

Description

@VanTanev

Prerequisites

Reproduction url

https://github.com/VanTanev/knip-lefthook-bug-reproduction

Reproduction access

  • I've made sure the reproduction is publicly accessible

Description of the issue

Reproduction is kind of tedious, because it requires cloning the repo and then creating a git worktree branch checkout.

The issue is that Knip assumes the hooks directory is always .git/hooks, but that is not the case. In a worktree checkout, .git is not a folder but instead a pointer to the real folder.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions