(cmd: string, cwd = root)
| 14 | } |
| 15 | |
| 16 | function execSafe(cmd: string, cwd = root): string | null { |
| 17 | try { |
| 18 | return exec(cmd, cwd) |
| 19 | } |
| 20 | catch { |
| 21 | return null |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | function getGitSha(dir: string): string | null { |
| 26 | return execSafe('git rev-parse HEAD', dir) |
no test coverage detected