From def26ebb0ece41eceaee7c1b8cf115ceab62f697 Mon Sep 17 00:00:00 2001 From: KeiSei84 <2206745@gmail.com> Date: Tue, 26 May 2026 18:53:39 +0800 Subject: [PATCH] fix(lib-hooks): root-cause fix from keigit 75325aaf --- install/lib-hooks.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install/lib-hooks.sh b/install/lib-hooks.sh index 8f6bcb2..e9dc4ff 100644 --- a/install/lib-hooks.sh +++ b/install/lib-hooks.sh @@ -27,14 +27,16 @@ install_hooks() { say " installed $hook_count hook(s)" # v0.17 — shared hook library (gate.sh + test-gate.sh) + # v0.40 — also copy *.toml files from _lib/ (policy-chain.toml for safe_tools). if [ -d "$KIT_DIR/hooks/_lib" ]; then mkdir -p "$HOOKS_DIR/_lib" local lib_count=0 lib_src lib_name - for lib_src in "$KIT_DIR/hooks/_lib/"*.sh; do + for lib_src in "$KIT_DIR/hooks/_lib/"*.sh "$KIT_DIR/hooks/_lib/"*.toml; do [ -f "$lib_src" ] || continue lib_name="$(basename "$lib_src")" cp -f "$lib_src" "$HOOKS_DIR/_lib/$lib_name" - chmod +x "$HOOKS_DIR/_lib/$lib_name" + # chmod +x only for shell scripts; .toml stays read-only. + case "$lib_name" in *.sh) chmod +x "$HOOKS_DIR/_lib/$lib_name" ;; esac lib_count=$((lib_count+1)) done say " installed $lib_count hook library file(s) -> $HOOKS_DIR/_lib/"