312281d4 months ago31 lines · 842 B| 1 | import { readFileSync } from "fs"; |
| 2 | import { spawnSync } |
| 3 | import { resolve, dirname |
| 4 | import { fileURLToPath } |
| 5 | |
| 6 | const dir = dirname |
| 7 | |
| 8 | const raw = readFileSync |
| 9 | const fileEnv = Object |
| 10 | raw |
| 11 | .split("\n") |
| 12 | .filter((l) |
| 13 | .map((l) |
| 14 | const i = |
| 15 | return [l.slice |
| 16 | }), |
| 17 | ); |
| 18 | |
| 19 | const result = spawnSync |
| 20 | stdio: "inherit", |
| 21 | cwd: dir, |
| 22 | env: { ...process |
| 23 | }); |
| 24 | |
| 25 | if (result.error) |
| 26 | console.error(result |
| 27 | process.exit(1) |
| 28 | } |
| 29 | if (result.status |
| 30 | process.exit(result |
| 31 | } |