From 9c797dea9497c40bea209c042c5558617ed7b97b Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sat, 26 Sep 2026 15:02:57 +0200 Subject: [PATCH] Name the line of a non-UTF-8 README.md --- CHANGELOG.md | 2 +- bin/loop-claude | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad17929f..21782057 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,4 +13,4 @@ - `loop-claude --help` names the Claude Code version its transcript, session and trust handling were observed on; check it first when an upgrade breaks a cycle. - `loop-claude` runs the model each project's settings pick; `LOOP_CLAUDE_WORKER_MODEL` and `LOOP_CLAUDE_JUDGE_MODEL` override it. - `settings.json`, the agents and the status line run on any machine unedited; the status line shows reset times in the machine's own time zone. -- `loop-claude`'s no-premises exit names what is wrong: `README.md` the OS cannot open or that is not UTF-8, a `## Goals` or `## Audience` heading missing or repeated, or nothing under one. +- `loop-claude`'s no-premises exit names what is wrong: `README.md` unopenable or not UTF-8, a `## Goals` or `## Audience` heading missing or repeated, or nothing under one. diff --git a/bin/loop-claude b/bin/loop-claude index 8776c751..754d09a9 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -166,7 +166,7 @@ def read_premises(root): except OSError as failure: sys.exit(f"README.md in {root}: {failure.strerror} - no premises.") except UnicodeDecodeError as failure: - sys.exit(f"README.md is not UTF-8 at byte {failure.start} - no premises.") + sys.exit(f"README.md is not UTF-8 on line {failure.object[:failure.start].count(b'\n') + 1} - no premises.") for name in ("Goals", "Audience"): bodies = found.get(name, []) if not bodies: