Expand a leading `~/` the way git does for `core.excludesFile`.
(p: string)
| 560 | |
| 561 | /** Expand a leading `~/` the way git does for `core.excludesFile`. */ |
| 562 | function expandUserPath(p: string): string { |
| 563 | if (p === '~') return os.homedir(); |
| 564 | if (p.startsWith('~/')) return path.join(os.homedir(), p.slice(2)); |
| 565 | return p; |
| 566 | } |
| 567 | |
| 568 | /** |
| 569 | * Root-relative exclude patterns from git sources that are NOT the root |
no test coverage detected