Skip to content
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

fix(cli): ensure an empty event loop counts as an error #6399

Merged

Conversation

merceyz
Copy link
Member

@merceyz merceyz commented Jul 17, 2024

What's the problem this PR addresses?

If the event loop unexpectedly becomes empty yarn will terminate with exit code 0 even though the command didn't complete successfully.

Ref nodejs/node#53902

Ref #6398 where that happens and the install is incomplete when yarn terminates with exit code 0. It's caught in the following yarn build step which can't find the install state.

How did you fix it?

Set process.exitCode to an error code before executing the CLI so an unexpected empty event loop counts as an error.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@merceyz merceyz force-pushed the merceyz/fix/ensure-an-empty-event-loop-counts-as-an-error branch from ec4396e to 1523479 Compare July 17, 2024 23:57
@merceyz merceyz force-pushed the merceyz/fix/ensure-an-empty-event-loop-counts-as-an-error branch from f81635e to 2c04e2a Compare July 18, 2024 00:34
@arcanis arcanis merged commit 9cc3c79 into master Jul 18, 2024
21 of 26 checks passed
@arcanis arcanis deleted the merceyz/fix/ensure-an-empty-event-loop-counts-as-an-error branch July 18, 2024 19:25
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.

2 participants