add missing error checks
Alan Pearce alan@alanpearce.eu
Tue, 25 Jun 2024 20:26:59 +0200
1 files changed, 9 insertions(+), 2 deletions(-)
jump to
M internal/server/server.go → internal/server/server.go
@@ -151,11 +151,18 @@ if err != nil { return nil, errors.WithMessage(err, "could not add directory to file watcher") } go fw.Start(func(filename string) { - rebuild(builderConfig, config) + log.Info("rebuilding site", "changed_file", filename) + err := rebuild(builderConfig, config) + if err != nil { + log.Error("error rebuilding site", "error", err) + } }) } - rebuild(builderConfig, config) + err = rebuild(builderConfig, config) + if err != nil { + return nil, err + } loggingMux := http.NewServeMux() mux, err := website.NewMux(config, runtimeConfig.Root)