fix: Fix the problem of adding exceptions to the image repository (#8585)

This commit is contained in:
ssongliu
2025-05-09 22:50:20 +08:00
committed by GitHub
parent 123a2e8998
commit f0375a83bb
+4 -2
View File
@@ -222,8 +222,10 @@ func (u *ImageRepoService) handleRegistries(newHost, delHost, handle string) err
if err != nil {
return err
}
if err := json.Unmarshal(file, &daemonMap); err != nil {
return err
if len(file) != 0 {
if err := json.Unmarshal(file, &daemonMap); err != nil {
return err
}
}
iRegistries := daemonMap["insecure-registries"]