From 411695484efe208375200fe8656e58a345590c34 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Tue, 13 Jun 2023 05:36:23 -0700 Subject: [PATCH] Open in Chrome instead of default browser Summary: To avoid the cases whereas Flipper opens up in engineer's default browser which may be different than Chrome. Reviewed By: aigoncharov Differential Revision: D46682220 fbshipit-source-id: 38d0ddefbc67989c5ec97a66e4a419318a66bc95 --- desktop/flipper-server/src/index.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/desktop/flipper-server/src/index.tsx b/desktop/flipper-server/src/index.tsx index ec38585b9..482ffc81a 100644 --- a/desktop/flipper-server/src/index.tsx +++ b/desktop/flipper-server/src/index.tsx @@ -325,11 +325,19 @@ async function launch() { return; } + const openInBrowser = () => { + open(url.toString(), {app: {name: open.apps.chrome}}); + }; + if (argv.bundler) { - open(url.toString()); + openInBrowser(); } else { const path = await findInstallation(); - open(path ?? url.toString()); + if (path) { + open(path); + } else { + openInBrowser(); + } } }