mirror of
https://github.com/replicatedhq/troubleshoot.git
synced 2026-02-14 18:29:53 +00:00
Quick fix to prevent panic on nil collector result (#1508)
* quick fix to prevent panic on nil collector result * do not save pod details on error
This commit is contained in:
@@ -72,6 +72,9 @@ func (c *CollectRunPod) Collect(progressChan chan<- interface{}) (result Collect
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
result, err = savePodDetails(ctx, client, result, c.BundlePath, c.ClientConfig, pod, c.Collector)
|
||||
if err != nil {
|
||||
klog.Errorf("failed to save pod details: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user