Skip to content

fix(node): install git hooks as real directories - #3741

Closed
vetrovk wants to merge 1 commit into
pre-commit:mainfrom
vetrovk:fix/node-install-links
Closed

fix(node): install git hooks as real directories#3741
vetrovk wants to merge 1 commit into
pre-commit:mainfrom
vetrovk:fix/node-install-links

Conversation

@vetrovk

@vetrovk vetrovk commented Aug 10, 2026

Copy link
Copy Markdown

Fixes #3737.

After the switch to git-based npm installation, a workspace package could remain a symlink to npm's temporary _cacache/tmp/git-clone... directory. Once npm removed that temporary clone, the installed hook executable was no longer available.

Pass --install-links=true for this installation so npm materializes the package. Add a regression test using a workspace package.

Validation:

  • regression test: passed
  • relevant Node subset: 10 passed
  • ESLint reproducer: executable successfully launched
  • format/style/flake8: passed
  • git diff --check: passed

mypy did not pass because of a macOS-specific sched_getaffinity error. The same failure reproduces on the clean upstream commit 242ce8a, so it is unrelated to this patch.

@asottile asottile closed this Aug 10, 2026
@pre-commit pre-commit locked as spam and limited conversation to collaborators Aug 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

install via git fails for some node hooks

2 participants