Skip to content

Commit c2052d0

Browse files
chore: quiet the session hook, lint-staged and schema check on success (#22793)
* chore: quiet the session hook, lint-staged and schema check on success * chore: remove the hook's temp log and show install failures in context
1 parent 7ec51c5 commit c2052d0

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

‎.claude/hooks/session-start.sh‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ if [ "${CLAUDE_CODE_REMOTE:-}" != "true" ]; then
77
fi
88

99
cd "$CLAUDE_PROJECT_DIR"
10-
node tooling/retry.js yarn --frozen-lockfile
10+
# Stdout lands in the agent's context on every start and resume, so the
11+
# install log is printed only on failure, to stdout with exit 0: Claude Code
12+
# shows only the first stderr line of a failing SessionStart hook.
13+
log="$(mktemp)"
14+
trap 'rm -f "$log"' EXIT
15+
if ! node tooling/retry.js yarn --frozen-lockfile >"$log" 2>&1; then
16+
cat "$log"
17+
fi

‎.husky/pre-commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no-install lint-staged
1+
npx --no-install lint-staged --quiet

‎tooling/generate-schemas.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,8 @@ const main = async () => {
16781678
console.log(
16791679
`${matching} of ${referenced.size + sourceOf.size} schemas derive from their sources, ${identical} byte for byte.`
16801680
);
1681-
if (reordered.length > 0) {
1681+
// Informational only: it reads like a failure, so only `--verbose` lists them.
1682+
if (verbose && reordered.length > 0) {
16821683
console.log(
16831684
`\n${reordered.length} round-trip but are written differently:`
16841685
);

0 commit comments

Comments
 (0)