ref: 3e9db2ad951dbb1000cd0f8f25e4a95445046679
parent: 449deb7f9ce089236f8328dd4fa585bea6e9bfde
author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
date: Mon Mar 2 06:07:09 EST 2020
hugolib: Fix error handling in page collector Fixes #6988
--- a/hugolib/pages_capture.go
+++ b/hugolib/pages_capture.go
@@ -158,7 +158,10 @@
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 {