Use configurable idb installation path

Summary:
Part of https://github.com/facebook/flipper/issues/262

Use the user-configured idb install location instead of a hardcoded one.

Reviewed By: passy

Differential Revision: D21860236

fbshipit-source-id: 5c604d7b6361e7c93ab49d8a03a437dfce880ac1
This commit is contained in:
John Knox
2020-06-04 03:01:18 -07:00
committed by Facebook GitHub Bot
parent 17763809dd
commit ec6310dc3b
3 changed files with 45 additions and 40 deletions

View File

@@ -171,7 +171,7 @@ const INITAL_STATE: State = {
staticView: WelcomeScreen,
};
const reducer = (state: State = INITAL_STATE, action: Actions): State => {
export default (state: State = INITAL_STATE, action: Actions): State => {
switch (action.type) {
case 'SET_STATIC_VIEW': {
const {payload} = action;
@@ -444,33 +444,6 @@ const reducer = (state: State = INITAL_STATE, action: Actions): State => {
}
};
export default (state: State = INITAL_STATE, action: Actions): State => {
const nextState = reducer(state, action);
if (nextState.selectedDevice) {
const {selectedDevice} = nextState;
const deviceNotSupportedErrorMessage = 'iOS Devices are not yet supported';
const error =
selectedDevice.os === 'iOS' &&
selectedDevice.deviceType === 'physical' &&
!iosUtil.isAvailable()
? deviceNotSupportedErrorMessage
: null;
if (error) {
const deviceNotSupportedError = nextState.errors.find(
(error) => error.message === deviceNotSupportedErrorMessage,
);
if (deviceNotSupportedError) {
deviceNotSupportedError.message = error;
} else {
nextState.errors.push({message: error});
}
}
}
return nextState;
};
function mergeError(
errors: FlipperError[],
newError: FlipperError,