Resolve panic on failed interface conversion in migration v156 (#15604)
go panics otherwise with `panic: interface conversion: error is git.ErrNotExist, not *git.ErrNotExist`, thanks to Codeberg/Andi for reporting this. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
1b3dbdba4e
commit
ea40eb749b
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error {
|
||||||
commit, err := gitRepo.GetTagCommit(release.TagName)
|
commit, err := gitRepo.GetTagCommit(release.TagName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if git.IsErrNotExist(err) {
|
if git.IsErrNotExist(err) {
|
||||||
log.Warn("Unable to find commit %s for Tag: %s in %-v. Cannot update publisher ID.", err.(*git.ErrNotExist).ID, release.TagName, repo)
|
log.Warn("Unable to find commit %s for Tag: %s in %-v. Cannot update publisher ID.", err.(git.ErrNotExist).ID, release.TagName, repo)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
log.Error("Error whilst getting commit for Tag: %s in %-v.", release.TagName, repo)
|
log.Error("Error whilst getting commit for Tag: %s in %-v.", release.TagName, repo)
|
||||||
|
|
Loading…
Add table
Reference in a new issue