Skip to content

Commit 67429fd

Browse files
authored
Fix log message when action did not produce any results (#148)
1 parent 44008e1 commit 67429fd

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

cmd/src/actions_exec_logger.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ func (a *actionLogger) ActionFailed(err error, patches []CampaignPlanPatch) {
7373
} else {
7474
yellow.Fprintf(os.Stderr, "✗ Action failed with %d errors.\n", len(perr))
7575
}
76-
} else {
76+
} else if err != nil {
7777
if len(patches) > 0 {
7878
yellow.Fprintf(os.Stderr, "✗ Action produced %d patches but failed with error: %s\n\n", len(patches), err)
7979
} else {
8080
yellow.Fprintf(os.Stderr, "✗ Action failed with error: %s\n\n", err)
8181
}
82+
} else {
83+
grey.Fprintf(os.Stderr, "✗ Action did not produce any patches.\n\n")
8284
}
8385
}
8486

@@ -106,7 +108,7 @@ func (a *actionLogger) RepoCacheHit(repo ActionRepo, patchProduced bool) {
106108
return
107109
}
108110

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

0 commit comments

Comments
 (0)