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

Function winRemove

scripts/local-schedule.js:103–106  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

101 if (!fs.existsSync(file)) return;
102 const job = JSON.parse(fs.readFileSync(file, 'utf8'));
103 if (job.id !== id || job.projectRoot !== root || typeof job.command !== 'string' || !job.command.trim()) {
104 throw new Error('Invalid schedule record.');
105 }
106 const invocation = platformInvocation({ command: 'claude', args: ['--permission-mode', 'default', '-p', '--', job.command] });
107 const result = spawnSync(invocation.command, invocation.args, { cwd: root, shell: false, stdio: 'inherit', env: { ...process.env, CLAUDE_PROJECT_DIR: root } });
108 if (result.error) throw result.error;
109 process.exitCode = result.status === null ? 1 : result.status;

Callers 1

local-schedule.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected