summaryrefslogtreecommitdiffhomepage
path: root/commands/hugo.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-10-22 20:20:48 +0200
committerBjørn Erik Pedersen <[email protected]>2018-10-23 08:09:41 +0200
commited7b3e261909fe425ef64216f12806840c45b205 (patch)
treec082a1f0b2f0ac4cbb95faa1779fdbaa2845b5a7 /commands/hugo.go
parent2bf686ee217808186385bfcf6156f15bbdb33651 (diff)
downloadhugo-ed7b3e261909fe425ef64216f12806840c45b205.tar.gz
hugo-ed7b3e261909fe425ef64216f12806840c45b205.zip
commands, hugolib: Get file context in "config parse failed" errors
Fixes #5325
Diffstat (limited to 'commands/hugo.go')
-rw-r--r--commands/hugo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/commands/hugo.go b/commands/hugo.go
index acc48539d..1cfbdcf7c 100644
--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -662,9 +662,10 @@ func (c *commandeer) fullRebuild() {
c.commandeerHugoState = &commandeerHugoState{}
err := c.loadConfig(true, true)
if err != nil {
- c.logger.ERROR.Println("Failed to reload config:", err)
// Set the processing on pause until the state is recovered.
c.paused = true
+ c.handleBuildErr(err, "Failed to reload config")
+
} else {
c.paused = false
}