mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
Fix regression when loading config -e is empty or HUGO_ENV or HUGO_ENVIRONMENT is set
Fixes #11013
This commit is contained in:
parent
5adc837904
commit
231374a1fa
6 changed files with 77 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue