()
| 63 | } |
| 64 | |
| 65 | export function getTelemetryConfigPath() { |
| 66 | const xdgConfigHome = process.env.XDG_CONFIG_HOME?.trim() |
| 67 | if (xdgConfigHome) { |
| 68 | return join(xdgConfigHome, 'tanstack', 'cli.json') |
| 69 | } |
| 70 | |
| 71 | const homeDirectory = getHomeDirectory().trim() |
| 72 | if (homeDirectory) { |
| 73 | return join(homeDirectory, '.config', 'tanstack', 'cli.json') |
| 74 | } |
| 75 | |
| 76 | return join(process.cwd(), '.tanstack', 'cli.json') |
| 77 | } |
| 78 | |
| 79 | async function readTelemetryConfigFile(configPath: string) { |
| 80 | if (!existsSync(configPath)) { |
no test coverage detected