MCPcopy
hub / github.com/claude-code-best/claude-code / execFileNoThrow

Function execFileNoThrow

src/utils/execFileNoThrow.ts:26–44  ·  view source on GitHub ↗
(
  file: string,
  args: string[],
  options: ExecFileOptions = {
    timeout: 10 * SECONDS_IN_MINUTE * MS_IN_SECOND,
    preserveOutputOnError: true,
    useCwd: true,
  },
)

Source from the content-addressed store, hash-verified

24}
25
26export function execFileNoThrow(
27 file: string,
28 args: string[],
29 options: ExecFileOptions = {
30 timeout: 10 * SECONDS_IN_MINUTE * MS_IN_SECOND,
31 preserveOutputOnError: true,
32 useCwd: true,
33 },
34): Promise<{ stdout: string; stderr: string; code: number; error?: string }> {
35 return execFileNoThrowWithCwd(file, args, {
36 abortSignal: options.abortSignal,
37 timeout: options.timeout,
38 preserveOutputOnError: options.preserveOutputOnError,
39 cwd: options.useCwd ? getCwd() : undefined,
40 env: options.env,
41 stdin: options.stdin,
42 input: options.input,
43 })
44}
45
46type ExecFileWithCwdOptions = {
47 abortSignal?: AbortSignal

Callers 15

fetchGitDiffFunction · 0.70
fetchGitDiffHunksFunction · 0.70
fetchUntrackedFilesFunction · 0.70
getIsHeadOnRemoteFunction · 0.70
hasUnpushedCommitsFunction · 0.70
getIsCleanFunction · 0.70
getChangedFilesFunction · 0.70
getFileStatusFunction · 0.70
stashToCleanStateFunction · 0.70
findRemoteBaseFunction · 0.70
captureUntrackedFilesFunction · 0.70
preserveGitStateForIssueFunction · 0.70

Calls 2

execFileNoThrowWithCwdFunction · 0.85
getCwdFunction · 0.85

Tested by

no test coverage detected