Skip to content

Commit a26f5cf

Browse files
committed
pkg/networks/config.go: fix overwriting non-nil err
Non-nil `cache.err` was overwritten Fix issue 2313 Signed-off-by: Akihiro Suda <[email protected]>
1 parent 8355d5e commit a26f5cf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/networks/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ func loadCache() {
135135
cache.err = yaml.UnmarshalWithOptions(b, &cache.config, yaml.Strict())
136136
if cache.err != nil {
137137
cache.err = fmt.Errorf("cannot parse %q: %w", configFile, cache.err)
138+
return
138139
}
139140
cache.config, cache.err = fillDefaults(cache.config)
140141
if cache.err != nil {

0 commit comments

Comments
 (0)