Use the correct channel for sending errors

This commit is contained in:
Alexander Neumann
2015-10-11 19:13:45 +02:00
parent 86c8328f62
commit db85ab8aa0
2 changed files with 9 additions and 3 deletions

View File

@@ -79,7 +79,14 @@ func (cmd CmdCheck) Execute(args []string) error {
for err := range errChan {
errorsFound = true
fmt.Fprintf(os.Stderr, "error: %v\n", err)
if e, ok := err.(checker.TreeError); ok {
fmt.Fprintf(os.Stderr, "error for tree %v:\n", e.ID.Str())
for _, treeErr := range e.Errors {
fmt.Fprintf(os.Stderr, " %v\n", treeErr)
}
} else {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
}
}
for _, id := range chkr.UnusedBlobs() {