Browse Source

Fix panic for fixBrokenRepoUnits16961 (#30068) (#30100)

backport #30068
tags/v1.21.11
yp05327 2 months ago
parent
commit
6d47b63be2
No account linked to committer's email address
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      modules/doctor/fix16961.go

+ 6
- 0
modules/doctor/fix16961.go View File

@@ -216,6 +216,12 @@ func fixBrokenRepoUnit16961(repoUnit *repo_model.RepoUnit, bs []byte) (fixed boo
return false, nil
}

var cfg any
err = json.UnmarshalHandleDoubleEncode(bs, &cfg)
if err == nil {
return false, nil
}

switch repoUnit.Type {
case unit.TypeCode, unit.TypeReleases, unit.TypeWiki, unit.TypeProjects:
cfg := &repo_model.UnitConfig{}

Loading…
Cancel
Save