(cwd: string)
| 31 | } |
| 32 | |
| 33 | async function assertDirectory(cwd: string): Promise<void> { |
| 34 | const stat = await fs.stat(cwd) |
| 35 | if (!stat.isDirectory()) throw new Error(`cwd is not a directory: ${cwd}`) |
| 36 | } |
| 37 | |
| 38 | function shellCommand(): string { |
| 39 | if (process.platform === "win32") return "powershell.exe" |