MCPcopy Create free account
hub / github.com/SethGammon/Citadel / runLocalCommand

Function runLocalCommand

scripts/continue-action.js:83–101  ·  view source on GitHub ↗
(projectRoot, action)

Source from the content-addressed store, hash-verified

81}
82
83function runLocalCommand(projectRoot, action) {
84 if (action.kind !== 'local-command') {
85 return { executed: false, status: 0 };
86 }
87
88 const result = spawnSync(process.execPath, action.args, {
89 cwd: projectRoot,
90 env: { ...process.env, CLAUDE_PROJECT_DIR: projectRoot },
91 encoding: 'utf8',
92 stdio: ['ignore', 'pipe', 'pipe'],
93 });
94
95 return {
96 executed: true,
97 status: result.status ?? 0,
98 stdout: result.stdout || '',
99 stderr: result.stderr || '',
100 };
101}
102
103function render(action, runResult = null) {
104 const lines = [

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected