Skip to content

graphify hook status reports "not installed" on husky 9 repos (looks in .husky/_/<hook> wrapper, not .husky/<hook>) #987

Closed

Description

@MikeRobGIT

Environment

  • graphifyy 0.8.16 (pip)
  • git 2.x with husky 9 (core.hooksPath = .husky/_)
  • macOS Darwin 25.3.0, Python 3.11

Symptom

With graphify's post-commit/post-checkout hooks correctly installed (markers present in .husky/post-commit and .husky/post-checkout, hooks fire on commit/checkout, rebuild log confirms execution), graphify hook status reports:

post-commit: not installed (hook exists but graphify not found)
post-checkout: not installed (hook exists but graphify not found)

Root cause

Husky 9 sets core.hooksPath = .husky/_. _hooks_dir(root) in graphify/hooks.py correctly returns .husky/_ per the fix from #401. But husky's layout puts the wrapper there:

.husky/_/post-commit    → #!/usr/bin/env sh\n. "$(dirname "$0")/h"
.husky/post-commit      → actual user hook with `# graphify-hook-start` marker

_check() in hooks.py:296 opens hooks_dir / name = .husky/_/post-commit, which is the two-line husky shim. The marker isn't there, so status reports "not installed" even though the chain .husky/_/post-commit → .husky/_/h → .husky/post-commit is wired up and active.

Reproduction

git init demo && cd demo
pnpm dlx husky init   # or any husky 9 install
graphify hook install
graphify hook status  # reports "not installed" despite working hooks

Suggested fix

In _check(), when hooks_dir.name == "_" and hooks_dir.parent.name == ".husky", also check hooks_dir.parent / name for the marker before reporting "not installed".

Related: #401 (partial husky support added in 0.4.19).

Activity

  1. safishamsi commented on May 23, 2026

    @safishamsi
    Member

    Fixed in v8 — added _user_hooks_dir() in hooks.py that redirects from .husky/_ to .husky/ when Husky 9 sets core.hooksPath to the wrapper dir. install, uninstall, and status all use the corrected path now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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