Improve error handling/messages in Hugo Pipes

Fixes #14257
Closes #14270
This commit is contained in:
Bjørn Erik Pedersen
2025-12-16 16:25:37 +01:00
parent b82e496c13
commit 0bf61353f6
15 changed files with 212 additions and 97 deletions
+7 -1
View File
@@ -17,6 +17,9 @@ import (
"log"
"os"
"github.com/gohugoio/hugo/common/herrors"
"github.com/gohugoio/hugo/common/loggers"
"github.com/gohugoio/hugo/commands"
)
@@ -24,6 +27,9 @@ func main() {
log.SetFlags(0)
err := commands.Execute(os.Args[1:])
if err != nil {
log.Fatalf("Error: %s", err)
for _, e := range herrors.Errors(err) {
loggers.Log().Errorf("%s", e)
}
os.Exit(1)
}
}