From: Bjørn Erik Pedersen Date: Thu, 18 May 2017 20:23:29 +0000 (+0300) Subject: tpl/images: Fix error handling in Config X-Git-Tag: v0.21~14 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=405c2f68;p=brevno-suite%2Fhugo tpl/images: Fix error handling in Config --- diff --git a/tpl/images/images.go b/tpl/images/images.go index 9244323b..d08033f2 100644 --- a/tpl/images/images.go +++ b/tpl/images/images.go @@ -70,10 +70,13 @@ func (ns *Namespace) Config(path interface{}) (image.Config, error) { } config, _, err = image.DecodeConfig(f) + if err != nil { + return config, err + } ns.cacheMu.Lock() ns.cache[filename] = config ns.cacheMu.Unlock() - return config, err + return config, nil }