GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — TypeScript/scripts/run-sequence.mjs at main · chalbert/TypeScript Expand file tree/ Copy pathrun-sequence.mjsMore file actions 21 lines (20 loc) · 841 Bytes / Copy pathrun-sequence.mjsFile metadata and controls21 lines (20 loc) · 841 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 import assert from "assert"; import cp from "child_process"; /** * @param {[string, string[]][]} tasks * @param {cp.SpawnSyncOptions} opts * @returns {string} */ export function runSequence(tasks, opts = { timeout: 100000, shell: true }) { let lastResult; for (const task of tasks) { console.log(`${task[0]} ${task[1].join(" ")}`); const result = cp.spawnSync(task[0], task[1], opts); if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && "stderr: " + result.stderr.toString()}${result.stdout && "\nstdout: " + result.stdout.toString()}`); console.log(result.stdout && result.stdout.toString()); lastResult = result; } const out = lastResult?.stdout?.toString(); assert(out !== undefined); return out; } |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |