Files
t3code/apps/server/src/process/runProbeProcess.ts
T
Julius Marminge 935e7c6cea Refactor process helpers for Windows handling and output limits
- Extract shared Windows command/process utilities
- Add process tree kill and probe process wrappers
- Cover output truncation and Windows command behavior with tests
2026-03-31 12:15:04 -07:00

18 lines
490 B
TypeScript

import { runProcess, type ProcessRunOptions, type ProcessRunResult } from "../processRunner";
type ProcessRunner = typeof runProcess;
export type ProbeProcessOptions = Omit<ProcessRunOptions, "stdin" | "outputMode">;
export function runProbeProcess(
command: string,
args: readonly string[],
options: ProbeProcessOptions = {},
runner: ProcessRunner = runProcess,
): Promise<ProcessRunResult> {
return runner(command, args, {
...options,
outputMode: "truncate",
});
}