chore: CI fixes

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2025-04-06 12:21:00 +02:00
parent 9ed3769765
commit bdd7725f17

View File

@@ -125,7 +125,8 @@ func run(ctx context.Context, args []string) int {
// Initialize collectors before loading and parsing CLI arguments
collectors := collector.NewWithFlags(app)
if err := config.Parse(app, os.Args[1:]); err != nil {
//nolint:contextcheck
if err := config.Parse(app, args); err != nil {
//nolint:sloglint // we do not have an logger yet
slog.LogAttrs(ctx, slog.LevelError, "Failed to load configuration",
slog.Any("err", err),
@@ -135,11 +136,13 @@ func run(ctx context.Context, args []string) int {
}
debug.SetMemoryLimit(*memoryLimit)
logger, err := log.New(logConfig)
if err != nil {
logger.LogAttrs(ctx, slog.LevelError, "failed to create logger",
slog.Any("err", err),
)
return 1
}