INNER CODE UNIT · TypeScript

onPath

rit3zh/reacticx · cloudflare/cli/index.ts:179

function onPath(name: string) {
  return new Promise<boolean>((resolve) => {
    const child = spawn("which", [name], { stdio: "ignore" });
    child.on("error", () => resolve(false));
    child.on("close", (code) => resolve(code === 0));
  });
}

/* -------------------------------------------------------------------------- */
/* push / status                                                               */
/* -------------------------------------------------------------------------- */

async function selectSteps(flags: Flags) {
  const chosen = steps.filter((step) => {
    if (flags.only.length > 0) return flags.only.includes(step.id);
    return !flags.skip.includes(step.id);
  });

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…