Skip to content

Commit f52edf4

Browse files
Fix type error in update command - handle None package name
1 parent da00570 commit f52edf4

File tree

1 file changed

+2
-1
lines changed
  • src/codegen/cli/commands/update

1 file changed

+2
-1
lines changed

src/codegen/cli/commands/update/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def update(
4444
rich.print("[red]Error:[/red] Cannot specify both --list and --version")
4545
raise typer.Exit(1)
4646

47-
package_info = distribution(codegen.__package__)
47+
package_name = codegen.__package__ or "codegen"
48+
package_info = distribution(package_name)
4849
current_version = Version(package_info.version)
4950

5051
if list_:

0 commit comments

Comments
 (0)