| 10 | const lazycommitPath = path.resolve('./dist/cli.mjs'); |
| 11 | |
| 12 | const createLazycommit = (fixture: FsFixture) => { |
| 13 | const homeEnv = { |
| 14 | HOME: fixture.path, // Linux |
| 15 | USERPROFILE: fixture.path, // Windows |
| 16 | }; |
| 17 | |
| 18 | return (args?: string[], options?: Options) => |
| 19 | execaNode(lazycommitPath, args, { |
| 20 | cwd: fixture.path, |
| 21 | ...options, |
| 22 | extendEnv: false, |
| 23 | env: { |
| 24 | ...homeEnv, |
| 25 | ...options?.env, |
| 26 | }, |
| 27 | |
| 28 | // Block tsx nodeOptions |
| 29 | nodeOptions: [], |
| 30 | }); |
| 31 | }; |
| 32 | |
| 33 | export const createGit = async (cwd: string) => { |
| 34 | const git = (command: string, args?: string[], options?: Options) => |