Commit 0bd593ba authored by Sandro Padin's avatar Sandro Padin Committed by Dan Abramov
Browse files

Catch and noop call to open web browser. (#964)

Running `create-react-app` in a Docker container causes an unhandled rejection error in nodejs > 6.5 because the `opn` module tries to open a web browser in a system that doesn't have one. I figured this error could be safely ignored.
parent 91c86502
No related merge requests found
Showing with 1 addition and 1 deletion
+1 -1
......@@ -28,7 +28,7 @@ function openBrowser(url) {
// Fallback to opn
// (It will always open new tab)
try {
opn(url);
opn(url).catch(() => {}); // Prevent `unhandledRejection` error.
return true;
} catch (err) {
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment