diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-18 23:23:29 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-05-18 23:24:55 +0300 |
commit | 405c2f6899fbe008df8ccd45355bd31846cf1b1d (patch) | |
tree | 60ed7c35600dbf2ed01e21a73e929e63a9747f80 /tpl/images/images.go | |
parent | 58d4c25e50b9399bd81e43254ddae5949778e577 (diff) |
tpl/images: Fix error handling in Config
Diffstat (limited to 'tpl/images/images.go')
-rw-r--r-- | tpl/images/images.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tpl/images/images.go b/tpl/images/images.go index 9244323b4..d08033f2d 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 } |