MCPcopy
hub / github.com/dotnet/vscode-csharp / execChildProcess

Function execChildProcess

src/common.ts:59–79  ·  view source on GitHub ↗
(
    command: string,
    workingDirectory: string | undefined,
    env: NodeJS.ProcessEnv
)

Source from the content-addressed store, hash-verified

57}
58
59export async function execChildProcess(
60 command: string,
61 workingDirectory: string | undefined,
62 env: NodeJS.ProcessEnv
63): Promise<string> {
64 return new Promise<string>((resolve, reject) => {
65 cp.exec(command, { cwd: workingDirectory, maxBuffer: 500 * 1024, env: env }, (error, stdout, stderr) => {
66 if (error) {
67 reject(
68 new Error(`${error}
69${stdout}
70${stderr}`)
71 );
72 } else if (stderr && !stderr.includes('screen size is bogus')) {
73 reject(new Error(stderr));
74 } else {
75 resolve(stdout);
76 }
77 });
78 });
79}
80
81export async function getUnixChildProcessIds(pid: number): Promise<number[]> {
82 return new Promise<number[]>((resolve, reject) => {

Callers 7

getMSBuildVersionFunction · 0.90
collectDumpWithToolFunction · 0.90
runDotnetInfoFunction · 0.90
parseDotnetInfoFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected