Files
clawdbot/src/infra/node-shell.ts
2026-01-25 12:57:06 +00:00

10 lines
292 B
TypeScript

export function buildNodeShellCommand(command: string, platform?: string | null) {
const normalized = String(platform ?? "")
.trim()
.toLowerCase();
if (normalized.startsWith("win")) {
return ["cmd.exe", "/d", "/s", "/c", command];
}
return ["/bin/sh", "-lc", command];
}