@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
ts 16 lines 517 Bytes
Raw
1 import type * as ChildProcess from "effect/process/ChildProcess"
2 import type * as NodeChildProcess from "node:child_process"
3
4 export const buildSpawnOptions = (
5 options: ChildProcess.CommandOptions,
6 base: Pick<NodeChildProcess.SpawnOptions, "cwd" | "env" | "stdio">,
7 platform: NodeJS.Platform
8 ): NodeChildProcess.SpawnOptions => {
9 const detached = options.detached ?? platform !== "win32"
10 return {
11 ...base,
12 detached,
13 shell: options.shell,
14 windowsHide: options.windowsHide ?? !detached
15 }
16 }