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