Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set

Fixes #11013
This commit is contained in:
Bjørn Erik Pedersen 2023-05-24 15:53:49 +02:00
parent 5adc837904
commit 231374a1fa
6 changed files with 77 additions and 7 deletions

View file

@ -546,9 +546,6 @@ func (c *serverCommand) PreRun(cd, runner *simplecobra.Commandeer) error {
c.doLiveReload = !c.disableLiveReload
c.fastRenderMode = !c.disableFastRender
c.showErrorInBrowser = c.doLiveReload && !c.disableBrowserError
if c.r.environment == "" {
c.r.environment = hugo.EnvironmentDevelopment
}
if c.fastRenderMode {
// For now, fast render mode only. It should, however, be fast enough