Skip to content

Commit 6d47b63

Browse files
authored
Fix panic for fixBrokenRepoUnits16961 (#30068) (#30100)
backport #30068
1 parent 8dccea0 commit 6d47b63

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/doctor/fix16961.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,12 @@ func fixBrokenRepoUnit16961(repoUnit *repo_model.RepoUnit, bs []byte) (fixed boo
216216
return false, nil
217217
}
218218

219+
var cfg any
220+
err = json.UnmarshalHandleDoubleEncode(bs, &cfg)
221+
if err == nil {
222+
return false, nil
223+
}
224+
219225
switch repoUnit.Type {
220226
case unit.TypeCode, unit.TypeReleases, unit.TypeWiki, unit.TypeProjects:
221227
cfg := &repo_model.UnitConfig{}

0 commit comments

Comments
 (0)