mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-23 19:32:10 +00:00
tpl/images: Fix error handling in Config
This commit is contained in:
parent
58d4c25e50
commit
405c2f6899
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue