summaryrefslogtreecommitdiffhomepage
path: root/hugolib
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2020-03-02 11:07:09 +0100
committerBjørn Erik Pedersen <[email protected]>2020-03-02 11:07:09 +0100
commit3e9db2ad951dbb1000cd0f8f25e4a95445046679 (patch)
tree4382e720e16d1015ea895617301a8f268d4f93df /hugolib
parent449deb7f9ce089236f8328dd4fa585bea6e9bfde (diff)
downloadhugo-3e9db2ad951dbb1000cd0f8f25e4a95445046679.tar.gz
hugo-3e9db2ad951dbb1000cd0f8f25e4a95445046679.zip
hugolib: Fix error handling in page collector
Fixes #6988
Diffstat (limited to 'hugolib')
-rw-r--r--hugolib/pages_capture.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/hugolib/pages_capture.go b/hugolib/pages_capture.go
index de7ccb084..020e243c5 100644
--- a/hugolib/pages_capture.go
+++ b/hugolib/pages_capture.go
@@ -158,7 +158,10 @@ func (c *pagesCollector) isCascadingEdit(dir contentDirKey) (bool, string) {
func (c *pagesCollector) Collect() (collectErr error) {
c.proc.Start(context.Background())
defer func() {
- collectErr = c.proc.Wait()
+ err := c.proc.Wait()
+ if collectErr == nil {
+ collectErr = err
+ }
}()
if len(c.filenames) == 0 {