MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / run

Function run

scripts/verify-native-pack.mjs:79–99  ·  view source on GitHub ↗
(cmd, args, cwd)

Source from the content-addressed store, hash-verified

77}
78
79function run(cmd, args, cwd) {
80 const res = spawnSync(cmd, args, {
81 cwd,
82 encoding: "utf8",
83 stdio: ["ignore", "pipe", "pipe"],
84 shell: process.platform === "win32",
85 });
86 if (res.status !== 0) {
87 die(
88 [
89 `verify-native-pack: command failed: ${cmd} ${args.join(" ")}`,
90 `cwd: ${cwd}`,
91 res.stdout?.trim() ? `stdout:\n${res.stdout.trim()}` : "",
92 res.stderr?.trim() ? `stderr:\n${res.stderr.trim()}` : "",
93 ]
94 .filter((l) => l.length > 0)
95 .join("\n\n"),
96 );
97 }
98 return (res.stdout ?? "").trim();
99}
100
101const { pkgDir, hostOnly } = parseArgs(process.argv);
102const pkgJsonPath = join(pkgDir, "package.json");

Callers 1

Calls 1

dieFunction · 0.70

Tested by

no test coverage detected