Some checks failed
✅ Check / 🔬 ESLint (push) Failing after 21s
✅ Check / 🏷️ Typecheck (push) Failing after 11s
✅ Check / 🔎 Test (push) Failing after 11s
✅ Check / e2e-test (push) Failing after 11s
✅ Check / 🔨 Build (push) Failing after 11s
🚀 Deploy / 🚀 Deploy (doc) (push) Failing after 12s
🚀 Deploy / 🚀 Deploy (demo) (push) Failing after 12s
🚀 Deploy / 🚀 Deploy (supabase) (push) Failing after 18s
16 lines
387 B
JavaScript
16 lines
387 B
JavaScript
import { spawnSync } from "node:child_process";
|
|
|
|
export function exec(file, args = [], opts = {}) {
|
|
const r = spawnSync(file, args, { encoding: "utf8", ...opts });
|
|
return {
|
|
status: r.status ?? (r.error ? 1 : 0),
|
|
stdout: r.stdout ?? "",
|
|
stderr: r.stderr ?? "",
|
|
error: r.error,
|
|
};
|
|
}
|
|
|
|
export function bash(cmd, opts = {}) {
|
|
return exec("bash", ["-c", cmd], opts);
|
|
}
|