From b7170e307708be6e6f09caa58784cc557afc9418 Mon Sep 17 00:00:00 2001 From: Catherine Date: Sun, 26 Apr 2026 21:05:55 +0000 Subject: [PATCH] Create a domain cache for CLI operations. Fixes a regression (crash) in `-update-site` introduced in commit bbdaae72802c96ea456301f4a1f035d56d92e6c4 . --- src/main.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.go b/src/main.go index 4ad92f2..8844c45 100644 --- a/src/main.go +++ b/src/main.go @@ -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,