diff options
author | Sam Smith <[email protected]> | 2020-03-01 22:00:28 +0000 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-03-02 18:46:14 +0100 |
commit | d7798906d8e152a5d33f76ed0362628da8dd2c35 (patch) | |
tree | 658d340063cf612c8a8e83bc96db6407eb0ce523 /tpl/resources | |
parent | 305ce1c9ec746d3b8f6c9306b7014bfd621478a5 (diff) | |
download | hugo-d7798906d8e152a5d33f76ed0362628da8dd2c35.tar.gz hugo-d7798906d8e152a5d33f76ed0362628da8dd2c35.zip |
tpl: Change error message on missing resource
Fixes #6942
Diffstat (limited to 'tpl/resources')
-rw-r--r-- | tpl/resources/resources.go | 3 |
1 files changed, 3 insertions, 0 deletions
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]) } |