Path: blob/main/lang/bun/files/patch-scripts_build_codegen.ts
46591 views
-- Skip bun install when node_modules already exists.1-- On FreeBSD, bun install fails due to a linux compat layer limitation2-- with /proc/self/fd (fchdir returns ENOTDIR for symlink-based FDs).3-- By checking for existing node_modules, the build uses pre-populated4-- node_modules from the port's distfile instead.562026-04-27 07:19:58 UTC7+++ scripts/build/codegen.ts8@@ -167,7 +167,7 @@ export function registerCodegenRules(n: Ninja, cfg: Co9n.rule("bun_install", {10command: hostWin11? `cmd /c "cd /d $dir && ${bun} install --frozen-lockfile && ${touch} $stamp"`12- : `cd $dir && ${bun} install --frozen-lockfile && ${touch} $stamp`,13+ : `cd $dir && ([ -d node_modules ] || ${bun} install --frozen-lockfile) && ${touch} $stamp`,14description: "install $dir",15restat: true,16// bun install can be memory-hungry and grabs a lockfile; serialize.171819