hugolib: Fix error handling in page collector

Fixes #6988
This commit is contained in:
Bjørn Erik Pedersen 2020-03-02 11:07:09 +01:00
parent 449deb7f9c
commit 3e9db2ad95
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -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 {