MCPcopy Index your code
hub / github.com/adobe/react-spectrum / run

Function run

scripts/buildPublishedAPI.js:289–306  ·  view source on GitHub ↗
(cmd, args, opts)

Source from the content-addressed store, hash-verified

287}
288
289function run(cmd, args, opts) {
290 return new Promise((resolve, reject) => {
291 let child = spawn(cmd, args, opts);
292 let result = '';
293 child.stdout?.on('data', function (data) {
294 result += data.toString();
295 });
296 child.on('error', reject);
297 child.on('close', code => {
298 if (code !== 0) {
299 reject(new Error('Child process failed'));
300 return;
301 }
302
303 resolve(result);
304 });
305 });
306}

Callers 2

addDepsFunction · 0.70
buildFunction · 0.70

Calls 2

toStringMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected