no panic for sigint

This commit is contained in:
bel
2025-05-04 10:57:43 -06:00
parent 31f7facac7
commit f2e828a9eb

View File

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