From 9046b6df78247dcee9370790b084d30feab567ba Mon Sep 17 00:00:00 2001 From: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com> Date: Sun, 11 Oct 2026 00:25:04 -0400 Subject: [PATCH] Harden make sqlc-check against a failing git status (#190) Co-authored-by: orchestrator-agent <20+orchestrator-agent@code.cubecraftcreations.com> --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4356184..027386b 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,8 @@ sqlc: $(SQLC) generate # Fails on any difference from the committed generated code, including new -# or deleted files. +# or deleted files. A failing git status is itself a failure: its empty +# output would otherwise read as "no drift". sqlc-check: sqlc - @drift="$$(git status --porcelain --untracked-files=all -- $(SQLC_OUT))"; \ + @drift="$$(git status --porcelain --untracked-files=all -- $(SQLC_OUT))" || { echo "git status failed; cannot check internal/db for drift"; exit 1; }; \ if [ -n "$$drift" ]; then echo "internal/db is stale; run make sqlc and commit:"; echo "$$drift"; git diff -- $(SQLC_OUT); exit 1; fi