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

Handle opn promise rejection #780

Merged

Conversation

alistairjcbrown
Copy link
Contributor

What kind of change does this PR introduce?

bugfix

Did you add or update the examples/?

No

Summary

The dev server uses opn to open the browser, which returns a promise. In headless environments, this call will fail and the promise will be rejected. Since node v6.6.0, a UnhandledPromiseRejectionWarning will be output when a rejected promise has no handler.

This PR adds a .catch handler and outputs a user friendly message that the browser could not be opened, and not to use the open flag in headless environments.

Does this PR introduce a breaking change?

No

Other information

None

@SpaceK33z SpaceK33z merged commit 0099613 into webpack:master Feb 6, 2017
@SpaceK33z
Copy link
Member

Thanks!

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.

None yet

2 participants