MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / runCommand

Function runCommand

scripts/build-harmony-har.js:383–397  ·  view source on GitHub ↗
(command, commandArgs, options)

Source from the content-addressed store, hash-verified

381}
382
383function runCommand(command, commandArgs, options) {
384 const { cwd, env, label } = options;
385 console.log(`> ${label}`);
386 console.log(` ${[command, ...commandArgs].join(' ')}`);
387
388 const result = spawnSync(command, commandArgs, {
389 cwd,
390 env,
391 stdio: 'inherit',
392 });
393
394 if (result.status !== 0) {
395 fail(`${label} failed with exit code ${result.status || 1}.`);
396 }
397}
398
399function findNewestHar(rootDir) {
400 if (!fs.existsSync(rootDir)) {

Callers 1

buildHarFunction · 0.70

Calls 1

failFunction · 0.85

Tested by

no test coverage detected