From d7798906d8e152a5d33f76ed0362628da8dd2c35 Mon Sep 17 00:00:00 2001 From: Sam Smith Date: Sun, 1 Mar 2020 22:00:28 +0000 Subject: [PATCH] tpl: Change error message on missing resource Fixes #6942 --- tpl/resources/resources.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tpl/resources/resources.go b/tpl/resources/resources.go index fd0ffc5ec..be10510f2 100644 --- a/tpl/resources/resources.go +++ b/tpl/resources/resources.go @@ -299,6 +299,9 @@ func (ns *Namespace) resolveArgs(args []interface{}) (resources.ResourceTransfor r, ok := args[1].(resources.ResourceTransformer) if !ok { + if _, ok := args[1].(map[string]interface{}); !ok { + return nil, nil, fmt.Errorf("no Resource provided in transformation") + } return nil, nil, fmt.Errorf("type %T not supported in Resource transformations", args[0]) }