pull/32397/merge
Akanksha Trehun 3 days ago committed by GitHub
commit a70e67c1cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -146,7 +146,9 @@ func (c *Client) SearchWithContext(ctx context.Context, term string) ([]SearchRe
result := &searchResponse{}
json.NewDecoder(res.Body).Decode(result)
if err := json.NewDecoder(res.Body).Decode(result); err != nil {
return nil, fmt.Errorf("failed to decode search results from %s: %w", p.String(), err)
}
return result.Data, nil
}

@ -112,6 +112,9 @@ func lintChart(path string, vals map[string]any, namespace string, kubeVersion *
if err != nil {
return linter, fmt.Errorf("unable to read temporary output directory %s: %w", tempDir, err)
}
if len(files) == 0 {
return linter, fmt.Errorf("temporary output directory %s is empty after extraction", tempDir)
}
if !files[0].IsDir() {
return linter, fmt.Errorf("unexpected file %s in temporary output directory %s", files[0].Name(), tempDir)
}

@ -74,12 +74,13 @@ func stopProfiling() error {
f, err := os.Create(memProfilePath)
if err != nil {
errs = append(errs, err)
}
defer f.Close()
} else {
defer f.Close()
runtime.GC() // get up-to-date statistics
if err := pprof.WriteHeapProfile(f); err != nil {
errs = append(errs, err)
runtime.GC() // get up-to-date statistics
if err := pprof.WriteHeapProfile(f); err != nil {
errs = append(errs, err)
}
}
}

Loading…
Cancel
Save