MCPcopy Index your code
hub / github.com/remix-run/react-router / runCommand

Function runCommand

packages/create-react-router/index.ts:604–626  ·  view source on GitHub ↗
(
  command: string,
  args: string[],
  options: { cwd: string; stdio: StdioOptions },
)

Source from the content-addressed store, hash-verified

602}
603
604function runCommand(
605 command: string,
606 args: string[],
607 options: { cwd: string; stdio: StdioOptions },
608) {
609 return new Promise<void>((resolve, reject) => {
610 let child = spawn(command, args, options);
611 child.on("error", reject);
612 child.on("exit", (code, signal) => {
613 if (code === 0) {
614 resolve();
615 } else {
616 reject(
617 new Error(
618 signal
619 ? `${command} exited with signal ${signal}`
620 : `${command} exited with code ${code}`,
621 ),
622 );
623 }
624 });
625 });
626}
627
628async function updatePackageJSON(ctx: Context) {
629 let packageJSONPath = path.join(ctx.cwd, "package.json");

Callers 2

gitInitStepFunction · 0.85
installDependenciesFunction · 0.85

Calls 2

resolveFunction · 0.50
rejectFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…