no panic for sigint

main
bel 2025-05-04 10:57:43 -06:00
parent 31f7facac7
commit f2e828a9eb
1 changed files with 5 additions and 1 deletions

View File

@ -17,5 +17,9 @@ func Main(ctx context.Context) error {
ctx, can := signal.NotifyContext(ctx, syscall.SIGINT)
defer can()
return cmd.Main(ctx)
if err := cmd.Main(ctx); err != nil && ctx.Err() == nil {
return err
}
return nil
}