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

Function command

scripts/runner-desktop-smoke.mjs:11–15  ·  view source on GitHub ↗
(cmd, args, options = {})

Source from the content-addressed store, hash-verified

9const build = !process.argv.includes("--skip-build");
10
11function command(cmd, args, options = {}) {
12 const result = spawnSync(cmd, args, { encoding: "utf8", stdio: "pipe", ...options });
13 if (result.status !== 0) throw new Error(`${cmd} ${args.join(" ")} failed\n${result.stdout ?? ""}\n${result.stderr ?? ""}`);
14 return result.stdout ?? "";
15}
16
17async function get(path) {
18 const response = await fetch(`http://127.0.0.1:${port}${path}`);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected