Skip to content

Commit eb17a92

Browse files
committed
Add exception handling
1 parent 49835aa commit eb17a92

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

infrahub_sdk/ctl/repository.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,8 @@ async def init(
187187
typer.echo(f"Error loading YAML file: {e}", err=True)
188188
raise typer.Exit(code=1)
189189

190-
await asyncio.to_thread(run_copy, str(example_repo), str(dst), data=config_data)
190+
try:
191+
await asyncio.to_thread(run_copy, str(example_repo), str(dst), data=config_data)
192+
except Exception as e:
193+
typer.echo(f"Error running copier: {e}", err=True)
194+
raise typer.Exit(code=1)

0 commit comments

Comments
 (0)