(pathToFile: string, cwd: string)
| 7 | import micromatch from "micromatch"; |
| 8 | |
| 9 | export async function add(pathToFile: string, cwd: string) { |
| 10 | const gitCmd = await spawn("git", ["add", pathToFile], { cwd }); |
| 11 | |
| 12 | if (gitCmd.code !== 0) { |
| 13 | console.log(pathToFile, gitCmd.stderr.toString()); |
| 14 | } |
| 15 | return gitCmd.code === 0; |
| 16 | } |
| 17 | |
| 18 | export async function commit(message: string, cwd: string) { |
| 19 | const gitCmd = await spawn( |
no outgoing calls