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

Function run

scripts/react-canary-install-prep.mjs:21–38  ·  view source on GitHub ↗
(cmd, args, opts)

Source from the content-addressed store, hash-verified

19fs.writeFileSync('./package.json', JSON.stringify(rootpkg, null, 2));
20
21function run(cmd, args, opts) {
22 return new Promise((resolve, reject) => {
23 let child = spawn(cmd, args, opts);
24 let result = '';
25 child.stdout?.on('data', function (data) {
26 result += data.toString();
27 });
28 child.on('error', reject);
29 child.on('close', code => {
30 if (code !== 0) {
31 reject(new Error('Child process failed'));
32 return;
33 }
34
35 resolve(result);
36 });
37 });
38}
39
40// {
41// "_id": "react@19.0.0-rc-dfd30974ab-20240613",

Callers 1

Calls 2

toStringMethod · 0.65
resolveFunction · 0.50

Tested by

no test coverage detected