MCPcopy Create free account
hub / github.com/acoyfellow/cloudbox / grepCheck

Function grepCheck

scripts/proof-launch-readiness.mjs:25–28  ·  view source on GitHub ↗
(name, path, needle)

Source from the content-addressed store, hash-verified

23 return { name, ok: result.status === 0, detail: result.status === 0 ? "pass" : tail(result.stderr || result.stdout) };
24}
25function grepCheck(name, path, needle) {
26 const text = readFileSync(path, "utf8");
27 return { name, ok: text.includes(needle), detail: needle };
28}
29function tail(text) {
30 return text.trim().split("\n").slice(-3).join(" / ");
31}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected