MCPcopy
hub / github.com/codeaashu/claude-code / execFilePromise

Function execFilePromise

src/utils/settings/mdm/rawRead.ts:32–47  ·  view source on GitHub ↗
(
  cmd: string,
  args: string[],
)

Source from the content-addressed store, hash-verified

30let rawReadPromise: Promise<RawReadResult> | null = null
31
32function execFilePromise(
33 cmd: string,
34 args: string[],
35): Promise<{ stdout: string; code: number | null }> {
36 return new Promise(resolve => {
37 execFile(
38 cmd,
39 args,
40 { encoding: 'utf-8', timeout: MDM_SUBPROCESS_TIMEOUT_MS },
41 (err, stdout) => {
42 // biome-ignore lint/nursery/noFloatingPromises: resolve() is not a floating promise
43 resolve({ stdout: stdout ?? '', code: err ? 1 : 0 })
44 },
45 )
46 })
47}
48
49/**
50 * Fire fresh subprocess reads for MDM settings and return raw stdout.

Callers 1

fireRawReadFunction · 0.85

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected