mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-26 11:01:57 +03:00
7a5e103a6a
Thanks @ymat19. Co-authored-by: ymat19 <45934497+ymat19@users.noreply.github.com>
10 lines
292 B
TypeScript
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];
|
|
}
|