MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / tryRun

Function tryRun

apps/kimi-code/scripts/native/exec.mjs:47–61  ·  view source on GitHub ↗
(command, args, options = {})

Source from the content-addressed store, hash-verified

45}
46
47export async function tryRun(command, args, options = {}) {
48 const exec = commandForExecFile(command, args);
49 try {
50 await execFileAsync(exec.command, exec.args, {
51 cwd: appRoot,
52 maxBuffer: 1024 * 1024 * 16,
53 ...exec.options,
54 });
55 } catch (error) {
56 const details = [error.stdout?.trim(), error.stderr?.trim(), error.message]
57 .filter(Boolean)
58 .join('\n');
59 console.warn(`Warning: ${basename(command)} ${args.join(' ')} failed.\n${details}`);
60 }
61}

Callers 1

removeSignatureIfNeededFunction · 0.90

Calls 3

commandForExecFileFunction · 0.85
basenameFunction · 0.85
warnMethod · 0.65

Tested by

no test coverage detected