MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / defaultProbes

Function defaultProbes

src/upgrade/remove-binary.ts:78–95  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

76}
77
78export function defaultProbes(filename: string): RemoveBinaryProbes {
79 return {
80 filename,
81 platform: process.platform,
82 cwd: process.cwd(),
83 env: process.env,
84 homedir: os.homedir(),
85 exists: fs.existsSync,
86 readlink: (p) => {
87 try { return fs.readlinkSync(p); } catch { return null; }
88 },
89 capture: (cmd, args) => {
90 const res = spawnSync(cmd, args, { encoding: 'utf8', windowsHide: true, timeout: 30_000 });
91 if (res.error || typeof res.status !== 'number') return null;
92 return { code: res.status, stdout: res.stdout ?? '' };
93 },
94 };
95}
96
97/**
98 * Path math keyed on the TARGET platform (not the host) — same convention as

Callers 1

runUninstallerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected