Skip to content

docs: clarify background job exit codes#7167

Open
StantonMatt wants to merge 1 commit into
yarnpkg:masterfrom
StantonMatt:stanton/docs-background-job-exit-code
Open

docs: clarify background job exit codes#7167
StantonMatt wants to merge 1 commit into
yarnpkg:masterfrom
StantonMatt:stanton/docs-background-job-exit-code

Conversation

@StantonMatt
Copy link
Copy Markdown

Closes #6801.

This documents the current portable shell behavior for foo & bar: background jobs are waited on, but they don't determine the script exit code. The exit code comes from the foreground command on the right.

That matches the existing shell implementation and the current background-job tests; this PR makes the yarn lint & yarn test example explicit about the consequence.

Verification:

  • node scripts/run-yarn.js test:unit packages/yarnpkg-shell -t "Background jobs" --runInBand
  • node scripts/run-yarn.js workspace @yarnpkg/docusaurus build (passes; existing Docusaurus broken-link/anchor and TypeDoc warnings are still emitted)
  • node scripts/run-yarn.js test:lint
  • node scripts/run-yarn.js version check

Signed-off-by: Matthew Stanton <stantonmatthewj@gmail.com>
@StantonMatt StantonMatt force-pushed the stanton/docs-background-job-exit-code branch from b30d713 to 015d6e4 Compare June 3, 2026 00:29
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.

[Bug?]: Only the last parallel task exit code is respected

2 participants