Name the line of a non-UTF-8 README.md

This commit is contained in:
2026-09-26 15:02:57 +02:00
parent 885d35b808
commit 9c797dea94
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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.
+1 -1
View File
@@ -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: