Skip to content

Conversation

@LegNeato
Copy link

contentlayer2 build currently spins up chokidar watchers even though the command is supposed to run once and exit. In sandboxed environments (e.g. Codex seatbelt) that watcher never reports readiness, so the process and any scripts that invoke it hang indefinitely.

Thread a new watch flag through the source-files fetcher and set it to false for generateDotpkg and dynamic builds while keeping watch=true for dev mode. That preserves incremental updates in dev while letting one-shot builds finish reliably.

Disclosure: Codex did the patch.

`contentlayer2 build` currently spins up chokidar watchers even though the command is supposed to run once and exit. In sandboxed environments (e.g. Codex seatbelt or some CI agents) that watcher never reports readiness, so the process and any scripts that invoke it hang indefinitely.

Thread a new watch flag through the source-files fetcher and set it to false for generateDotpkg and dynamic builds while keeping watch=true for dev mode. That preserves incremental updates in dev while letting one-shot builds finish reliably.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant