()
| 873 | // index if the user opts gitignored child repos in below (#1156). |
| 874 | const dbPath = getDatabasePath(projectPath); |
| 875 | const runIndex = async (): Promise<IndexResult> => { |
| 876 | const supervision = installCommandSupervision('init', { progressPaths: [dbPath, `${dbPath}-wal`] }); |
| 877 | try { |
| 878 | if (options.verbose) { |
| 879 | return await cg.indexAll({ onProgress: createVerboseProgress(), verbose: true }); |
| 880 | } |
| 881 | process.stdout.write(`${colors.dim}${getGlyphs().rail}${colors.reset}\n`); |
| 882 | const progress = createShimmerProgress(); |
| 883 | const r = await cg.indexAll({ onProgress: progress.onProgress }); |
| 884 | await progress.stop(); |
| 885 | return r; |
| 886 | } finally { |
| 887 | supervision.stop(); |
| 888 | } |
| 889 | }; |
| 890 | const result = await runIndex(); |
| 891 | printIndexResult(clack, result, projectPath); |
| 892 | await recordIndexTelemetry(cg, result); |
no test coverage detected