Check if Android Studio is installed
Summary: Since Android Studio is technically not required, I made this check optional. Though, these steps will gurantee that android env will work for an engineer who opened flipper for the first time Reviewed By: lblasa Differential Revision: D51267272 fbshipit-source-id: f30e58f322ea080b00a27ae86b871df2b39e1bb9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d88cf41a24
commit
f6445fea43
@@ -15,3 +15,8 @@ export const installXcode =
|
|||||||
|
|
||||||
export const installSDK =
|
export const installSDK =
|
||||||
'You can install it using Xcode (https://developer.apple.com/xcode/).';
|
'You can install it using Xcode (https://developer.apple.com/xcode/).';
|
||||||
|
|
||||||
|
export const installAndroidStudio = [
|
||||||
|
'Android Studio is not installed.',
|
||||||
|
'Install Android Studio from https://developer.android.com/studio',
|
||||||
|
].join('\n');
|
||||||
@@ -21,7 +21,8 @@ import {
|
|||||||
getIdbInstallationInstructions,
|
getIdbInstallationInstructions,
|
||||||
installXcode,
|
installXcode,
|
||||||
installSDK,
|
installSDK,
|
||||||
} from './fb-stubs/ios';
|
installAndroidStudio,
|
||||||
|
} from './fb-stubs/messages';
|
||||||
import {validateSelectedXcodeVersion} from './fb-stubs/validateSelectedXcodeVersion';
|
import {validateSelectedXcodeVersion} from './fb-stubs/validateSelectedXcodeVersion';
|
||||||
|
|
||||||
export function getHealthchecks(): FlipperDoctor.Healthchecks {
|
export function getHealthchecks(): FlipperDoctor.Healthchecks {
|
||||||
@@ -66,6 +67,29 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
|
|||||||
isRequired: false,
|
isRequired: false,
|
||||||
isSkipped: false,
|
isSkipped: false,
|
||||||
healthchecks: [
|
healthchecks: [
|
||||||
|
...(process.platform === 'darwin'
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
key: 'android.android-studio',
|
||||||
|
label: 'Android Studio Installed',
|
||||||
|
isRequired: false,
|
||||||
|
run: async (_: FlipperDoctor.EnvironmentInfo) => {
|
||||||
|
const hasProblem = !fs.existsSync(
|
||||||
|
'/Applications/Android Studio.app',
|
||||||
|
);
|
||||||
|
|
||||||
|
const message = hasProblem
|
||||||
|
? installAndroidStudio
|
||||||
|
: `Android Studio is installed.`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
hasProblem,
|
||||||
|
message,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
key: 'android.sdk',
|
key: 'android.sdk',
|
||||||
label: 'SDK Installed',
|
label: 'SDK Installed',
|
||||||
|
|||||||
Reference in New Issue
Block a user