commands: Fix server panic regression

And now with a proper server test.

Fixes #9518
Fixes #9530
Fixes #9539
This commit is contained in:
Bjørn Erik Pedersen 2022-02-21 19:12:04 +01:00
parent 4ada09415d
commit aebde49b88
4 changed files with 45 additions and 15 deletions

View file

@ -422,7 +422,7 @@ func (c *commandeer) loadConfig() error {
}
c.hugoSites = h
// TODO(bep) improve.
if c.buildLock == nil {
if c.buildLock == nil && h != nil {
c.buildLock = h.LockBuild
}
close(c.created)