()
| 642 | // index if the user opts gitignored child repos in below (#1156). |
| 643 | const dbPath = getDatabasePath(projectPath); |
| 644 | const runIndex = async (): Promise<IndexResult> => { |
| 645 | const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] }); |
| 646 | try { |
| 647 | if (options.verbose) { |
| 648 | return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true }); |
| 649 | } |
| 650 | process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`); |
| 651 | const progress = createShimmerProgress(); |
| 652 | const r = await cg.indexAll({ onProgress: progress.onProgress }); |
| 653 | await progress.stop(); |
| 654 | return r; |
| 655 | } finally { |
| 656 | supervision.stop(); |
| 657 | } |
| 658 | }; |
| 659 | const result = await runIndex(); |
| 660 | printIndexResult(clack, result, projectPath); |
| 661 | await recordIndexTelemetry(cg, result); |
no test coverage detected