Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
danewilson opened this issue May 20, 2025 · 0 comments
Open
1 task

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

danewilson opened this issue May 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@danewilson
Copy link

Self-service

  • I'd be willing to implement a fix

Describe the bug

Yarn supports parallel tasks, however it's not clear how exit codes are handled. It appears that only the exit code of the last task affects the final exit code. If this is intentional, perhaps the docs should explicitly state this and outline a better use case, because the example given is yarn lint & yarn test, which I think in most scenarios you would want to error if either one of those commands errored.

To reproduce

Assuming there is a formatting error, running yarn error produces an error because prettier is last, whereas yarn no-error does not:

{
  "scripts": {
    "error": "eslint . & prettier .",
    "no-error": "prettier . & eslint ."
  }
}

Environment

System:
  OS: macOS 15.5
  CPU: (12) arm64 Apple M3 Pro
Binaries:
  Node: 22.14.0 - /private/var/folders/ds/6vsg08yd4w3f4h4_0p0p86cw0000gn/T/xfs-4d8e788a/node
  Yarn: 4.9.1 - /private/var/folders/ds/6vsg08yd4w3f4h4_0p0p86cw0000gn/T/xfs-4d8e788a/yarn
  npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm
npmPackages:
  jest: ^29.7.0 => 29.7.0

Additional context

No response

@danewilson danewilson added the bug Something isn't working label May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant