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

Swallow promise rejection in registerChild as it is handled via callback #946

Merged
merged 1 commit into from
Aug 10, 2017

Conversation

viliusl
Copy link
Contributor

@viliusl viliusl commented Jul 29, 2017

Description

ChildProcessUtilities.registerChild() attaches itself to an execa thenable, but then there is no catch, so if command executed fails, there is an unhandledRejection. Given execa promise is returned/handled via callback, it's ok to swallow error.

Motivation and Context

Not clean - using lerna api for an extension and get unhandled rejections in tests:)

How Has This Been Tested?

Cleaned-up tests, I could add regression test though.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sorry, something went wrong.

@evocateur evocateur changed the title ChildProcessUtilities.registerChild: swallow promise rejection as it is handled via callback Swallow promise rejection in registerChild as it is handled via callback Aug 10, 2017
@evocateur evocateur merged commit 90c3118 into lerna:master Aug 10, 2017
@evocateur
Copy link
Member

Thanks @viliusl!

@viliusl viliusl deleted the unhandled-rejection-fix branch August 15, 2017 18:33
@viliusl
Copy link
Contributor Author

viliusl commented Aug 15, 2017

No, thank you:)

@lock
Copy link

lock bot commented Dec 27, 2018

This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants