kopia lustrzana https://codeberg.org/Codeberg/pages-server
Fix cached error when .domains is not readable (fixes https://codeberg.org/Codeberg/Community/issues/1512)
Co-authored-by: @algernon
rodzic
275c580706
commit
61f7a65855
|
@ -33,7 +33,8 @@ func (o *Options) CheckCanonicalDomain(giteaClient *gitea.Client, actualDomain,
|
||||||
body, err := giteaClient.GiteaRawContent(o.TargetOwner, o.TargetRepo, o.TargetBranch, canonicalDomainConfig)
|
body, err := giteaClient.GiteaRawContent(o.TargetOwner, o.TargetRepo, o.TargetBranch, canonicalDomainConfig)
|
||||||
if err != nil && !errors.Is(err, gitea.ErrorNotFound) {
|
if err != nil && !errors.Is(err, gitea.ErrorNotFound) {
|
||||||
log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
|
log.Error().Err(err).Msgf("could not read %s of %s/%s", canonicalDomainConfig, o.TargetOwner, o.TargetRepo)
|
||||||
// TODO: WTF we just continue?! Seems fine as body is empty... :/
|
// Assume that the domain is valid, as Gitea seems to be broken. Don't cache it though.
|
||||||
|
return actualDomain, true
|
||||||
}
|
}
|
||||||
|
|
||||||
var domains []string
|
var domains []string
|
||||||
|
|
Ładowanie…
Reference in New Issue