Skip to content

Commit

Permalink
Fix log message when action did not produce any results (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrnugget authored Mar 2, 2020
1 parent 44008e1 commit 67429fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/src/actions_exec_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,14 @@ func (a *actionLogger) ActionFailed(err error, patches []CampaignPlanPatch) {
} else {
yellow.Fprintf(os.Stderr, "✗ Action failed with %d errors.\n", len(perr))
}
} else {
} else if err != nil {
if len(patches) > 0 {
yellow.Fprintf(os.Stderr, "✗ Action produced %d patches but failed with error: %s\n\n", len(patches), err)
} else {
yellow.Fprintf(os.Stderr, "✗ Action failed with error: %s\n\n", err)
}
} else {
grey.Fprintf(os.Stderr, "✗ Action did not produce any patches.\n\n")
}
}

Expand Down Expand Up @@ -106,7 +108,7 @@ func (a *actionLogger) RepoCacheHit(repo ActionRepo, patchProduced bool) {
return
}

fmt.Fprintf(os.Stderr, "%s -> Cached result found: no diff produced for this repository.\n", green.Sprint(repo.Name))
fmt.Fprintf(os.Stderr, "%s -> Cached result found: no diff produced for this repository.\n", grey.Sprint(repo.Name))
}
}

Expand Down

0 comments on commit 67429fd

Please sign in to comment.