From 1d0ffc56156d35a682d6e5fd966e72dc13acc2e4 Mon Sep 17 00:00:00 2001 From: yxxhero Date: Mon, 16 Mar 2026 14:14:11 +0800 Subject: [PATCH] fix: propagate errors instead of panic in list() When skipCharts=false, errors from list() now properly propagate instead of causing a crash. Uses a closure variable to capture the error and propagates it after withPreparedCharts completes. Signed-off-by: yxxhero --- pkg/app/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/app/app.go b/pkg/app/app.go index 8d599969..ac75f891 100644 --- a/pkg/app/app.go +++ b/pkg/app/app.go @@ -643,17 +643,17 @@ func (a *App) ListReleases(c ListConfigProvider) error { var err error if !c.SkipCharts() { + var listErr error err = run.withPreparedCharts("list", state.ChartPrepareOptions{ SkipRepos: true, SkipDeps: true, Concurrency: 2, }, func() { - rel, err := a.list(run) - if err != nil { - panic(err) - } - stateReleases = rel + stateReleases, listErr = a.list(run) }) + if listErr != nil { + err = listErr + } } else { stateReleases, err = a.list(run) }