INNER CODE UNIT · JavaScript

findExistingPath

reactnativecn/react-native-update · scripts/build-harmony-har.js:421

function findExistingPath(candidates) {
  for (const candidate of candidates) {
    if (candidate && fs.existsSync(candidate)) {
      return candidate;
    }
  }

  return null;
}

function runCommand(command, commandArgs, options) {
  const { cwd, env, label } = options;
  console.log(`> ${label}`);
  console.log(`  ${[command, ...commandArgs].join(' ')}`);

  const result = spawnSync(command, commandArgs, {
    cwd,
    env,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…