MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / parseLine

Function parseLine

src/utils/process-tree.ts:24–37  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

22 let lastError: string | undefined;
23
24 const parseLine = (line: string): ProcessTreeEntry | null => {
25 const tokens = line.trim().split(/\s+/);
26 if (tokens.length < 3) {
27 return null;
28 }
29 const pid = tokens[0];
30 const ppid = tokens[1];
31 const name = tokens[2];
32 if (!pid || !ppid || !name) {
33 return null;
34 }
35 const command = tokens.slice(3).join(' ');
36 return { pid, ppid, name, command };
37 };
38
39 const fetchProcessInfo = async (pid: string): Promise<ProcessTreeEntry | null> => {
40 const command = ['-o', 'pid=,ppid=,comm=,args=', '-p', pid];

Callers 1

fetchProcessInfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected