ci: fix dependencies

This commit is contained in:
eric
2026-03-15 13:54:18 +01:00
parent 54109136ab
commit f975f12553
37 changed files with 522 additions and 148 deletions

View File

@@ -1,5 +1,18 @@
import { spawnSync } from "node:child_process";
const pathValue = process.env.PATH ?? "";
function commandSucceeds(command: string, args: string[]): boolean {
const result = spawnSync(command, args, {
encoding: "utf8",
env: process.env,
});
return result.status === 0;
}
console.log(JSON.stringify({
hasHostSentinel: pathValue.includes("rules_bun_host_path_sentinel"),
canRunBun: commandSucceeds("bun", ["-e", "process.exit(0)"]),
canRunBunx: commandSucceeds("bunx", ["--version"]),
canRunNode: commandSucceeds("node", ["-e", "process.exit(0)"]),
}));