diff --git a/scripts/governance-drift-check.py b/scripts/governance-drift-check.py index 738fc29..1189d5c 100755 --- a/scripts/governance-drift-check.py +++ b/scripts/governance-drift-check.py @@ -18,11 +18,17 @@ report, not a gate. import json import os import re -import subprocess +import signal import sys from datetime import date from pathlib import Path +# Report cleanly when the reader closes early (`| head`), rather than tracebacking. +try: + signal.signal(signal.SIGPIPE, signal.SIG_DFL) +except (AttributeError, ValueError): # not POSIX, or not on the main thread + pass + HOME = Path.home() CLAUDE_MD = HOME / "dotfiles" / "CLAUDE.md" MONTHS = ("january february march april may june july august september "