From 7273c934643c3e19506a5eacc03bd46c43fc42b3 Mon Sep 17 00:00:00 2001 From: gmeghnag Date: Tue, 21 May 2024 14:03:49 +0200 Subject: [PATCH] [FIX] close #162 --- cmd/get/get.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/get/get.go b/cmd/get/get.go index 1a5c6419..ccdabe0d 100644 --- a/cmd/get/get.go +++ b/cmd/get/get.go @@ -248,7 +248,9 @@ func getNamespacedResources(resourceNamePlural string, resourceGroup string, res fmt.Fprintln(os.Stderr, "Error when trying to unmarshal file "+podPath) os.Exit(1) } - UnstructuredItems.Items = append(UnstructuredItems.Items, podItem) + if podItem.Object != nil { + UnstructuredItems.Items = append(UnstructuredItems.Items, podItem) + } } } else if err := yaml.Unmarshal(_file, &UnstructuredItems); err != nil { fmt.Fprintln(os.Stderr, err)