export function executeSync()

in src/utils/exec.ts [29:42]


export function executeSync(cmd: string, args: string[], { cwd }: { cwd: string }): string {
  const { stdout, status } = childProcess.spawnSync(cmd, args, {
    cwd,
    shell: true,
    stdio: ["ignore", "pipe", "inherit"],
  });

  if (status === 0) {
    return stdout.toString().trim();
  } else {
    process.stderr.write(stdout);
    throw new Error(`${cmd} exited with status ${status ?? "unknown"}`);
  }
}