()
| 801 | // index if the user opts gitignored child repos in below (#1156). |
| 802 | const dbPath = getDatabasePath(projectPath); |
| 803 | const runIndex = async (): Promise<IndexResult> => { |
| 804 | const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] }); |
| 805 | try { |
| 806 | if (options.verbose) { |
| 807 | return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true }); |
| 808 | } |
| 809 | process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`); |
| 810 | const progress = createShimmerProgress(); |
| 811 | const r = await cg.indexAll({ onProgress: progress.onProgress }); |
| 812 | await progress.stop(); |
| 813 | return r; |
| 814 | } finally { |
| 815 | supervision.stop(); |
| 816 | } |
| 817 | }; |
| 818 | const result = await runIndex(); |
| 819 | printIndexResult(clack, result, projectPath); |
| 820 | await recordIndexTelemetry(cg, result); |
no test coverage detected