Skip to content

Commit d8f3f81

Browse files
committed
error if we can't detect containerd config version when patching containerd config
1 parent cfb0b66 commit d8f3f81

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/internal/patch/toml.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ func ContainerdTOML(toPatch string, patches []string, patches6902 []string) (str
4040
if err != nil {
4141
return "", errors.WithStack(err)
4242
}
43+
if version == 0 {
44+
return "", errors.New("failed to detect containerd config version")
45+
}
4346
// apply merge patches
4447
for _, patch := range patches {
4548
pj, err := tomlToJSON([]byte(patch))

0 commit comments

Comments
 (0)