Skip to content

Commit d6c7398

Browse files
iamaeroplaneclaude
andcommitted
fix(extensions): safely access optional author field in extension_info
ExtensionManifest doesn't expose an author property - the author field is optional in extension.yml and stored in data["extension"]["author"]. Use safe dict access to avoid AttributeError. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fcf0e8e commit d6c7398

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/specify_cli/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2488,8 +2488,11 @@ def extension_info(
24882488
if ext_manifest:
24892489
console.print(f"{ext_manifest.description}")
24902490
console.print()
2491-
console.print(f"[dim]Author:[/dim] {ext_manifest.author}")
2492-
console.print()
2491+
# Author is optional in extension.yml, safely retrieve it
2492+
author = ext_manifest.data.get("extension", {}).get("author")
2493+
if author:
2494+
console.print(f"[dim]Author:[/dim] {author}")
2495+
console.print()
24932496

24942497
if ext_manifest.commands:
24952498
console.print("[bold]Commands:[/bold]")

0 commit comments

Comments
 (0)