add more files

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2026-03-18 08:24:19 +08:00 committed by yxxhero
parent 92205e827a
commit f1d3b93079
1 changed files with 7 additions and 2 deletions

View File

@ -526,8 +526,13 @@ func (helm *execer) List(context HelmContext, filter string, flags ...string) (s
//
// This fixes it by removing the header from the v3 output, so that the output is formatted the same as that of v2.
lines := strings.Split(string(out), "\n")
lines = lines[1:]
out = []byte(strings.Join(lines, "\n"))
var filtered []string
for _, line := range lines[1:] {
if trimmed := strings.TrimSpace(line); trimmed != "" {
filtered = append(filtered, trimmed)
}
}
out = []byte(strings.Join(filtered, "\n"))
helm.info(out)
return string(out), err
}