From a19abe4029111d75862fde5d3cb001a272c0fb84 Mon Sep 17 00:00:00 2001 From: asabya Date: Tue, 14 May 2024 15:26:52 +0530 Subject: [PATCH] fix: potential fix for #629 --- pkg/pod/ls.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/pod/ls.go b/pkg/pod/ls.go index 3531d5c9..4e97f42f 100644 --- a/pkg/pod/ls.go +++ b/pkg/pod/ls.go @@ -26,9 +26,11 @@ func (p *Pod) ListPods() ([]string, []string, error) { if err != nil { // skipcq: TCV-001 return nil, nil, err } - err := p.storeUserPodsV2(podList) - if err != nil { - fmt.Println("error storing podsV2", err) + if len(podList.Pods) != 0 || len(podList.SharedPods) != 0 { + err := p.storeUserPodsV2(podList) + if err != nil { + fmt.Println("error storing podsV2", err) + } } }