Skip to content

Commit

Permalink
Add additional detailed warning message if no tasks were run. (vercel…
Browse files Browse the repository at this point in the history
…#2778)

This is a quality of life improvement output log so that you don't have to tease it out from the overall run summary and the situation is more-apparent.
  • Loading branch information
nathanhammond authored and elitan committed Dec 6, 2022
1 parent 5f302b2 commit de40571
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/internal/run/run_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ func (r *RunState) Close(terminal cli.Ui, filename string) error {
if r.Cached == r.Attempted && r.Attempted > 0 {
maybeFullTurbo = ui.Rainbow(">>> FULL TURBO")
}

if r.Attempted == 0 {
terminal.Output("") // Clear the line
terminal.Warn("No tasks were executed as part of this run.")
}
terminal.Output("") // Clear the line
terminal.Output(util.Sprintf("${BOLD} Tasks:${BOLD_GREEN} %v successful${RESET}${GRAY}, %v total${RESET}", r.Cached+r.Success, r.Attempted))
terminal.Output(util.Sprintf("${BOLD}Cached: %v cached${RESET}${GRAY}, %v total${RESET}", r.Cached, r.Attempted))
Expand Down

0 comments on commit de40571

Please sign in to comment.