Skip to content

Commit

Permalink
prettify output
Browse files Browse the repository at this point in the history
  • Loading branch information
delanni committed Aug 29, 2024
1 parent 8b3ead7 commit 85ecc8d
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/dev/run_quick_checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ function printResults(startTimestamp: number, results: CheckResult[]) {
logger.info(`- Total time: ${total}, effective: ${effective}`);

results.forEach((result) => {
logger.write(
`--- ${result.success ? '✅' : '❌'} ${result.script}: ${humanizeTime(result.durationMs)}`
);
const resultLabel = result.success ? '✅' : '❌';
const scriptPath = stripRoot(result.script);
const runtime = humanizeTime(result.durationMs);
logger.write(`--- ${resultLabel} ${scriptPath}: ${runtime}`);
if (result.success) {
logger.debug(result.output);
} else {
Expand Down Expand Up @@ -220,3 +221,7 @@ function validateScriptPath(scriptPath: string) {
return;
}
}

function stripRoot(script: string) {
return script.replace(REPO_ROOT, '');
}

0 comments on commit 85ecc8d

Please sign in to comment.