Update cmd/helm/profiling.go

Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
This commit is contained in:
Evans Mungai
2025-02-17 18:31:17 +00:00
committed by Scott Rigby
parent 867c97e70d
commit 996ad84453

View File

@@ -83,8 +83,8 @@ func stopProfiling() error {
}
}
if len(errs) > 0 {
return fmt.Errorf("errors while stopping profiling: [%s]", strings.Join(errs, ", "))
if err := errors.Join(errs...); err != nil {
return fmt.Errorf("error(s) while stopping profiling: %w", err)
}
return nil