From eb666dcd41152f6008fd61cbd2a703dbb8e1e991 Mon Sep 17 00:00:00 2001 From: Will Pfleger Date: Tue, 21 Jul 2026 13:42:02 -0400 Subject: [PATCH] fix(justfile): use Hermit-pinned lefthook in hooks recipe (#2241) Signed-off-by: Will Pfleger Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 --- CONTRIBUTING.md | 2 +- Justfile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a684f84bb..d6278f5eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ unacceptable behavior to **conduct@buzz-relay.org**. | Flutter | 3.41+ | Required for mobile app — install via [flutter.dev](https://docs.flutter.dev/get-started/install) | | Docker | 24+ | For Postgres, Redis, MinIO | | `just` | latest | Task runner — `cargo install just` | -| `lefthook` | latest | Optional; run `lefthook install` for local Git hooks | +| `lefthook` | 2.1.3 (Hermit-pinned) | Auto-installed by `just hooks` — no manual install needed | | `sqlx` migrations | workspace crate | `just migrate` applies embedded migrations from `migrations/` | This repo uses [Hermit](https://cashapp.github.io/hermit/) for toolchain diff --git a/Justfile b/Justfile index 2f5ea0e89..317541e2f 100644 --- a/Justfile +++ b/Justfile @@ -52,6 +52,10 @@ setup: bootstrap hooks: #!/usr/bin/env bash set -euo pipefail + # Use the Hermit-pinned lefthook (bin/lefthook self-downloads on first use): + # works with no pre-installed lefthook and guarantees the pinned version + # rather than whatever happens to be on PATH. + export PATH="{{justfile_directory()}}/bin:$PATH" # --path-format=absolute guarantees an absolute path from every invocation context: # without it, --git-common-dir returns ".git" from the main checkout and a # relative hooksPath would break linked-worktree dispatch just like .hooks did.