mirror of
1
Fork 0

[GITEA] doctor: Don't say All done when no checks were run

When there were no checks run, don't say "All done", but "No checks to
run" instead, to make it clear what happened.

Addresses another part of #1905.

Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
(cherry picked from commit d75f13bde7)
This commit is contained in:
Gergely Nagy 2023-12-09 13:25:27 +01:00 committed by Earl Warren
parent d847469ea2
commit df6d98799c
No known key found for this signature in database
GPG Key ID: 0579CB2928A78A00
1 changed files with 5 additions and 1 deletions

View File

@ -104,7 +104,11 @@ func RunChecks(ctx context.Context, colorize, autofix bool, checks []*Check) err
logger.Info("OK")
}
}
logger.Info("\nAll done.")
if len(checks) > 0 {
logger.Info("\nAll done.")
} else {
logger.Info("\nNo checks to run.")
}
return nil
}