* Parse a `.taskmd.yaml` config file. Returns null on any error.
(configPath: string)
| 38 | * Parse a `.taskmd.yaml` config file. Returns null on any error. |
| 39 | */ |
| 40 | function readConfig(configPath: string): TaskmdConfig | null { |
| 41 | try { |
| 42 | const content = fs.readFileSync(configPath, "utf-8"); |
| 43 | return (parse(content) as TaskmdConfig | null) ?? null; |
| 44 | } catch { |
| 45 | return null; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Read the task directory from a `.taskmd.yaml` config file. |
no outgoing calls
no test coverage detected