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

Function readTaskDirFromConfig

apps/vscode/src/config.ts:54–58  ·  view source on GitHub ↗

* Read the task directory from a `.taskmd.yaml` config file. * Supports both `task-dir` and `dir` keys (task-dir takes precedence). * Returns the raw value, or null if neither key is set.

(configPath: string)

Source from the content-addressed store, hash-verified

52 * Returns the raw value, or null if neither key is set.
53 */
54function readTaskDirFromConfig(configPath: string): string | null {
55 const config = readConfig(configPath);
56 if (!config) return null;
57 return config["task-dir"] ?? config.dir ?? null;
58}
59
60/**
61 * Resolve the absolute task directory for a given file path.

Callers 1

resolveTaskDirFunction · 0.85

Calls 1

readConfigFunction · 0.85

Tested by

no test coverage detected