Files
openwork/.opencode/skill/release/load-env.ts
Benjamin Shafii f244691026 Add release skill
2026-01-13 18:54:05 -08:00

29 lines
511 B
TypeScript

import { run } from "./client";
const REQUIRED = [
"pnpm",
"cargo",
"gh",
"hdiutil",
"codesign",
"spctl",
];
export async function loadEnv() {
const missing: string[] = [];
for (const bin of REQUIRED) {
try {
await run("/usr/bin/env", ["bash", "-lc", `command -v ${bin}`], { allowFailure: false });
} catch {
missing.push(bin);
}
}
if (missing.length) {
throw new Error(`Missing required tools: ${missing.join(", ")}`);
}
return { ok: true as const };
}