MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / run

Function run

apps/host-cloudflare/scripts/preview.ts:93–101  ·  view source on GitHub ↗
(command: string, args: string[], options?: { input?: string; cwd?: string })

Source from the content-addressed store, hash-verified

91};
92
93const run = (command: string, args: string[], options?: { input?: string; cwd?: string }): void => {
94 const result = spawnSync(command, args, {
95 cwd: options?.cwd ?? APP_DIR,
96 stdio: [options?.input === undefined ? "ignore" : "pipe", "inherit", "inherit"],
97 input: options?.input,
98 env: process.env,
99 });
100 if (result.status !== 0) fail(`${command} ${args.join(" ")} exited with ${result.status}`);
101};
102
103const prNumber = (): number => {
104 const index = process.argv.indexOf("--pr");

Callers 1

deployFunction · 0.70

Calls 1

failFunction · 0.70

Tested by

no test coverage detected