MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / execFilePromise

Function execFilePromise

source code/utils/settings/mdm/rawRead.ts:34–49  ·  view source on GitHub ↗
(
  cmd: string,
  args: string[],
)

Source from the content-addressed store, hash-verified

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