Filter out OS devices when finding valid clients
Summary: When running debug builds, and not specifying a `device=...` qualifier as part of the deeplink, you'd get stuck on the "waiting for plugin to be launched" dialogue as Flipper would accept the local MacOS (or Windows, ...) connection as a valid client which can be quite confusing. Reviewed By: mweststrate Differential Revision: D31857737 fbshipit-source-id: ff568544f660c51e17b40c2aaadf058588746ef9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ece8b8e1a1
commit
ec9e3aeb6e
@@ -452,12 +452,17 @@ async function selectDevicesAndClient(
|
||||
): Promise<false | BaseDevice | Client> {
|
||||
function findValidDevices() {
|
||||
// find connected devices with the right OS.
|
||||
return store
|
||||
.getState()
|
||||
.connections.devices.filter((d) => d.connected.get())
|
||||
.filter(
|
||||
(d) => params.devices.length === 0 || params.devices.includes(d.os),
|
||||
);
|
||||
return (
|
||||
store
|
||||
.getState()
|
||||
.connections.devices.filter((d) => d.connected.get())
|
||||
.filter(
|
||||
(d) => params.devices.length === 0 || params.devices.includes(d.os),
|
||||
)
|
||||
// This filters out OS-level devices which are causing more confusion than good
|
||||
// when used with deeplinks.
|
||||
.filter(canBeDefaultDevice)
|
||||
);
|
||||
}
|
||||
|
||||
// loop until we have devices (or abort)
|
||||
|
||||
Reference in New Issue
Block a user