From c7eee433da3204d21b5aef174d98dc697c366856 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Sat, 13 Dec 2025 17:16:54 +0100 Subject: [PATCH 1/2] fix: configure husky hooks for reliable execution Enhance husky pre-commit and pre-push hooks to ensure consistent and reliable execution. - Set executable bit on both pre-commit and pre-push scripts. - Implement robust PATH resolution within hooks using git rev-parse to find the repository root. - Add a safety check for 'node_modules/.bin' directory existence before modifying the PATH. - Addresses issues with tools not being found and inconsistent execution environments. --- .husky/pre-commit | 8 ++++++++ .husky/pre-push | 8 ++++++++ 2 files changed, 16 insertions(+) mode change 100644 => 100755 .husky/pre-commit mode change 100644 => 100755 .husky/pre-push diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 index a0e3a53df53..4e3d629c364 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,3 +1,11 @@ +#!/usr/bin/env sh +# Add node_modules/.bin to PATH for local binaries +# Use git to find the repository root reliably +REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$(dirname -- "$0")/../..")" +if [ -d "$REPO_ROOT/node_modules/.bin" ]; then + export PATH="$REPO_ROOT/node_modules/.bin:$PATH" +fi + branch="$(git rev-parse --abbrev-ref HEAD)" if [ "$branch" = "main" ]; then diff --git a/.husky/pre-push b/.husky/pre-push old mode 100644 new mode 100755 index 4cf91d95800..3101e17d5b6 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,3 +1,11 @@ +#!/usr/bin/env sh +# Add node_modules/.bin to PATH for local binaries +# Use git to find the repository root reliably +REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$(dirname -- "$0")/../..")" +if [ -d "$REPO_ROOT/node_modules/.bin" ]; then + export PATH="$REPO_ROOT/node_modules/.bin:$PATH" +fi + branch="$(git rev-parse --abbrev-ref HEAD)" if [ "$branch" = "main" ]; then From 91f9aa34d9f98e85c1500e204b8b576f82c9d606 Mon Sep 17 00:00:00 2001 From: Kevin van Dijk Date: Tue, 13 Jan 2026 12:10:36 +0100 Subject: [PATCH 2/2] Add changeset --- .changeset/wild-lobsters-shake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wild-lobsters-shake.md diff --git a/.changeset/wild-lobsters-shake.md b/.changeset/wild-lobsters-shake.md new file mode 100644 index 00000000000..4f48893c8fc --- /dev/null +++ b/.changeset/wild-lobsters-shake.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +fix: configure husky hooks for reliable execution