Skip to content

Commit

Permalink
Fix panic for fixBrokenRepoUnits16961 (#30068) (#30100)
Browse files Browse the repository at this point in the history
backport #30068
  • Loading branch information
yp05327 authored Mar 26, 2024
1 parent 8dccea0 commit 6d47b63
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/doctor/fix16961.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}
Expand Down

0 comments on commit 6d47b63

Please sign in to comment.