Files
explore/scripts/make-cli-executable.mjs
b10fba99e6 Initial commit
Co-authored-by: Brent Vatne <[email protected]>
Co-authored-by: Szymon Dziedzic <[email protected]>
2026-10-14 14:10:07 -07:00

12 lines
322 B
JavaScript

import { chmod } from "node:fs/promises";
import { dirname, resolve } from "node:path";
const workspace = process.cwd();
const cli = resolve(workspace, "dist", "cli.js");
if (dirname(dirname(cli)) !== workspace) {
throw new Error(`Refusing to change mode for unexpected CLI path: ${cli}`);
}
await chmod(cli, 0o755);