* 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)
| 52 | * Returns the raw value, or null if neither key is set. |
| 53 | */ |
| 54 | function 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. |
no test coverage detected