Fix: missing recipient should print a message

This commit is contained in:
Johannes Kirschbauer
2025-05-16 18:09:53 +02:00
parent 1afd5b273d
commit 07b676e901

View File

@@ -297,6 +297,13 @@ def get_public_age_keys(contents: str) -> set[str]:
if match:
recipient = match[1]
if not recipient:
msg = (
f"Empty or invalid recipient on line {line_number}. "
"Expected a valid `# recipient: age1...` comment or a recognized recipient format."
)
raise ClanError(msg)
keys.add(recipient)
if line.startswith("#"):