Fix regression with site.IsServer when not running a server

Fixes #11006
This commit is contained in:
Bjørn Erik Pedersen
2023-05-24 09:26:30 +02:00
parent 99407c39ba
commit 9a235d0afc
10 changed files with 13 additions and 10 deletions

View File

@@ -339,7 +339,7 @@ func (r *rootCommand) Run(ctx context.Context, cd *simplecobra.Commandeer, args
b := newHugoBuilder(r, nil)
if err := b.loadConfig(cd, true); err != nil {
if err := b.loadConfig(cd, false); err != nil {
return err
}

View File

@@ -204,7 +204,7 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string
listener := f.c.serverPorts[i].ln
logger := f.c.r.logger
r.Printf("Environment: %q", f.c.hugoTry().Deps.Site.Hugo().Environment)
r.Printf("Environment: %q\n", f.c.hugoTry().Deps.Site.Hugo().Environment)
if i == 0 {
if f.c.renderToDisk {