MCPcopy Index your code
hub / github.com/GrapesJS/react / runCommand

Function runCommand

scripts/common.ts:3–10  ·  view source on GitHub ↗
(command: string, error?: string)

Source from the content-addressed store, hash-verified

1import { execSync } from 'child_process';
2
3export function runCommand(command: string, error?: string) {
4 try {
5 return (execSync(command, { stdio: 'inherit' }) || '').toString().trim();
6 } catch (err) {
7 console.error(error || `Error while running command: ${command}`);
8 throw err;
9 }
10}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected