mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 01:41:22 +00:00
feat: add exec host routing + node daemon
This commit is contained in:
10
src/infra/node-shell.ts
Normal file
10
src/infra/node-shell.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function buildNodeShellCommand(command: string, platform?: string | null) {
|
||||
const normalized = String(platform ?? "")
|
||||
.trim()
|
||||
.toLowerCase();
|
||||
if (normalized.includes("win")) {
|
||||
return ["cmd.exe", "/d", "/s", "/c", command];
|
||||
}
|
||||
return ["/bin/sh", "-lc", command];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user