From 7ed8c181100588d033b3551c253bbdfca90f1406 Mon Sep 17 00:00:00 2001 From: Pooja Singh <36136335+NoSkillGirl@users.noreply.github.com> Date: Thu, 15 Oct 2020 03:28:16 +0530 Subject: [PATCH] small fix (#1195) --- pkg/kyverno/apply/command.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/kyverno/apply/command.go b/pkg/kyverno/apply/command.go index 69d0a831f5..f2ee639ae9 100644 --- a/pkg/kyverno/apply/command.go +++ b/pkg/kyverno/apply/command.go @@ -178,7 +178,7 @@ func Command() *cobra.Command { } var resources []*unstructured.Unstructured - if resourcePaths[0] == "-" { + if len(resourcePaths) > 0 && resourcePaths[0] == "-" { if common.IsInputFromPipe() { resourceStr := "" scanner := bufio.NewScanner(os.Stdin)