Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/lang/bun/files/patch-scripts_build_codegen.ts
46591 views
1
-- Skip bun install when node_modules already exists.
2
-- On FreeBSD, bun install fails due to a linux compat layer limitation
3
-- with /proc/self/fd (fchdir returns ENOTDIR for symlink-based FDs).
4
-- By checking for existing node_modules, the build uses pre-populated
5
-- node_modules from the port's distfile instead.
6
7
2026-04-27 07:19:58 UTC
8
+++ scripts/build/codegen.ts
9
@@ -167,7 +167,7 @@ export function registerCodegenRules(n: Ninja, cfg: Co
10
n.rule("bun_install", {
11
command: hostWin
12
? `cmd /c "cd /d $dir && ${bun} install --frozen-lockfile && ${touch} $stamp"`
13
- : `cd $dir && ${bun} install --frozen-lockfile && ${touch} $stamp`,
14
+ : `cd $dir && ([ -d node_modules ] || ${bun} install --frozen-lockfile) && ${touch} $stamp`,
15
description: "install $dir",
16
restat: true,
17
// bun install can be memory-hungry and grabs a lockfile; serialize.
18
19