Create a domain cache for CLI operations.

Fixes a regression (crash) in `-update-site` introduced in commit
  bbdaae7280
.
This commit is contained in:
Catherine
2026-04-26 21:05:55 +00:00
parent 7f5e02081d
commit b7170e3077

View File

@@ -328,6 +328,10 @@ func Main(versionInfo string) {
logc.Fatalln(ctx, err)
}
if domainCache, err = CreateDomainCache(ctx); err != nil {
logc.Fatalln(ctx, err)
}
// The server has its own logic for creating the backend.
if cliOperations > 0 {
if backend, err = CreateBackend(ctx, &config.Storage); err != nil {
@@ -654,10 +658,6 @@ func Main(versionInfo string) {
}
backend = NewObservedBackend(backend)
if domainCache, err = CreateDomainCache(ctx); err != nil {
logc.Fatalln(ctx, err)
}
middleware := chainHTTPMiddleware(
panicHandler,
remoteAddrMiddleware,