Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional detailed warning message if no tasks were run. #2778

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this pattern so that the ANSI formatting is limited to a single line of output.

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