()
| 666 | } |
| 667 | |
| 668 | async function assertGitIdentityConfigured() { |
| 669 | const name = (await $`git config --get user.name`.nothrow()).stdout.toString().trim() |
| 670 | const email = (await $`git config --get user.email`.nothrow()).stdout.toString().trim() |
| 671 | if (name && email) return |
| 672 | throw new Error( |
| 673 | "Git author identity is missing in this environment. Configure user.name and user.email before committing.", |
| 674 | ) |
| 675 | } |
| 676 | |
| 677 | async function restoreGitConfig() { |
| 678 | if (gitConfig === undefined) return |
no test coverage detected