MCPcopy Create free account
hub / github.com/driangle/taskmd / findConfigFile

Function findConfigFile

apps/vscode/src/config.ts:23–35  ·  view source on GitHub ↗
(startDir: string)

Source from the content-addressed store, hash-verified

21 * Returns the absolute path to the config file, or null if not found.
22 */
23export function findConfigFile(startDir: string): string | null {
24 let current = startDir;
25 while (true) {
26 const candidate = path.join(current, CONFIG_FILENAME);
27 if (fs.existsSync(candidate)) {
28 return candidate;
29 }
30 const parent = path.dirname(current);
31 if (parent === current) break; // reached filesystem root
32 current = parent;
33 }
34 return null;
35}
36
37/**
38 * Parse a `.taskmd.yaml` config file. Returns null on any error.

Callers 3

config.test.tsFile · 0.90
resolveTaskDirFunction · 0.85
readScopesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected