mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl/images: Fix error handling in Config
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user