diff --git a/git-hooks/pre-commit b/git-hooks/pre-commit index 51c3421d2af..fcbe9b663c3 100755 --- a/git-hooks/pre-commit +++ b/git-hooks/pre-commit @@ -50,15 +50,14 @@ git add -- "${files[@]}" # This hook is also exercised from lightweight temp repos in tests, where the # staged-file safety behavior matters but the full OpenClaw workspace does not -# exist. Only run the repo-wide gate inside a real checkout. +# exist. Only run the repo-wide validation gate inside a real checkout. if [[ -f "$ROOT_DIR/package.json" ]] && [[ -f "$ROOT_DIR/pnpm-lock.yaml" ]]; then cd "$ROOT_DIR" case "${FAST_COMMIT:-}" in 1|true|TRUE|yes|YES|on|ON) - echo "FAST_COMMIT enabled: skipping pnpm format and pnpm check in pre-commit hook." + echo "FAST_COMMIT enabled: skipping pnpm check in pre-commit hook." ;; *) - pnpm format pnpm check ;; esac diff --git a/test/git-hooks-pre-commit.test.ts b/test/git-hooks-pre-commit.test.ts index 2a162e80950..7229a91fb44 100644 --- a/test/git-hooks-pre-commit.test.ts +++ b/test/git-hooks-pre-commit.test.ts @@ -73,7 +73,7 @@ describe("git-hooks/pre-commit (integration)", () => { expect(staged).toEqual(["--all"]); }); - it("skips pnpm format and pnpm check when FAST_COMMIT is enabled", () => { + it("skips pnpm check when FAST_COMMIT is enabled", () => { const dir = mkdtempSync(path.join(os.tmpdir(), "openclaw-pre-commit-yolo-")); run(dir, "git", ["init", "-q", "--initial-branch=main"]); @@ -116,8 +116,6 @@ describe("git-hooks/pre-commit (integration)", () => { FAST_COMMIT: "1", }); - expect(output).toContain( - "FAST_COMMIT enabled: skipping pnpm format and pnpm check in pre-commit hook.", - ); + expect(output).toContain("FAST_COMMIT enabled: skipping pnpm check in pre-commit hook."); }); });