MCPcopy Index your code
hub / github.com/codebymitch/TitanBot / runCommand

Function runCommand

scripts/restore-drill.js:60–72  ·  view source on GitHub ↗
(command, args)

Source from the content-addressed store, hash-verified

58}
59
60function runCommand(command, args) {
61 const result = spawnSync(command, args, {
62 encoding: 'utf8',
63 stdio: 'pipe',
64 shell: process.platform === 'win32'
65 });
66
67 if (result.status !== 0) {
68 throw new Error(`${command} failed: ${result.stderr || result.stdout || 'Unknown error'}`);
69 }
70
71 return result.stdout;
72}
73
74async function pruneBackups(backupDir, retentionDays) {
75 if (!Number.isFinite(retentionDays) || retentionDays <= 0) {

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected