()
| 660 | // index if the user opts gitignored child repos in below (#1156). |
| 661 | const dbPath = getDatabasePath(projectPath); |
| 662 | const runIndex = async (): Promise<IndexResult> => { |
| 663 | const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] }); |
| 664 | try { |
| 665 | if (options.verbose) { |
| 666 | return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true }); |
| 667 | } |
| 668 | process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`); |
| 669 | const progress = createShimmerProgress(); |
| 670 | const r = await cg.indexAll({ onProgress: progress.onProgress }); |
| 671 | await progress.stop(); |
| 672 | return r; |
| 673 | } finally { |
| 674 | supervision.stop(); |
| 675 | } |
| 676 | }; |
| 677 | const result = await runIndex(); |
| 678 | printIndexResult(clack, result, projectPath); |
| 679 | await recordIndexTelemetry(cg, result); |
no test coverage detected