mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
commands: Avoid panic in error handler on config errors
This commit is contained in:
@@ -334,7 +334,11 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, string, string, erro
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
f.c.logger.ERROR.Println(err)
|
f.c.logger.ERROR.Println(err)
|
||||||
}
|
}
|
||||||
fmt.Fprint(w, injectLiveReloadScript(&b, f.c.Cfg.GetInt("liveReloadPort")))
|
port = 1313
|
||||||
|
if !f.c.paused {
|
||||||
|
port = f.c.Cfg.GetInt("liveReloadPort")
|
||||||
|
}
|
||||||
|
fmt.Fprint(w, injectLiveReloadScript(&b, port))
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user