(command: string, cwd?: string)
| 2 | import { execFileSync, execSync } from "child_process"; |
| 3 | |
| 4 | export function runCommand(command: string, cwd?: string) { |
| 5 | execSync(command, { |
| 6 | stdio: "inherit", |
| 7 | cwd: cwd ?? process.cwd(), |
| 8 | // Set CI to avoid extra NPM logs and potentially unwanted interactive modes |
| 9 | env: { |
| 10 | ...process.env, |
| 11 | // Internal flag to avoid duplicating user messages |
| 12 | SWA_CLI_INTERNAL_COMMAND: "1", |
| 13 | }, |
| 14 | }); |
| 15 | } |
| 16 | |
| 17 | export function execFileCommand(command: string, cwd?: string, args?: string[]) { |
| 18 | const child = execFileSync(command, args, { |
no outgoing calls
no test coverage detected
searching dependent graphs…