Skip to content

fix: await CLI startup in bin entrypoint#16656

Open
soumith-aireddi wants to merge 1 commit into
payloadcms:mainfrom
soumith-aireddi:fix/payload-await-cli-start
Open

fix: await CLI startup in bin entrypoint#16656
soumith-aireddi wants to merge 1 commit into
payloadcms:mainfrom
soumith-aireddi:fix/payload-await-cli-start

Conversation

@soumith-aireddi
Copy link
Copy Markdown

What?

Replaces the three void start() calls in packages/payload/bin.js with await start().

Why?

The executable entrypoint starts async CLI work without awaiting it. Awaiting startup ties process lifecycle and failures to the CLI startup promise instead of fire-and-forget execution.

How?

Uses top-level await in the existing ESM entrypoint. No startup branches or CLI behavior were otherwise changed.

Validation:

  • node --check packages/payload/bin.js
  • git diff --check -- packages/payload/bin.js
  • node packages/payload/bin.js info

Fixes #

@soumith-aireddi soumith-aireddi changed the title fix(payload): await CLI startup in bin entrypoint fix: await CLI startup in bin entrypoint May 18, 2026
@soumith-aireddi soumith-aireddi marked this pull request as ready for review May 18, 2026 09:16
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