check xcode-select is using the latest major version available
Reviewed By: mweststrate Differential Revision: D50369254 fbshipit-source-id: 140a044ca55ec1f445b38e02c7df13cb667d89c6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
73862c9408
commit
b6560e1c74
19
desktop/doctor/src/fb-stubs/validateSelectedXcodeVersion.tsx
Normal file
19
desktop/doctor/src/fb-stubs/validateSelectedXcodeVersion.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {FlipperDoctor} from 'flipper-common';
|
||||
|
||||
export async function validateSelectedXcodeVersion(
|
||||
_selectedPath: string,
|
||||
): Promise<FlipperDoctor.HealthcheckRunResult> {
|
||||
return {
|
||||
hasProblem: false,
|
||||
message: '',
|
||||
};
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import * as path from 'path';
|
||||
import type {FlipperDoctor} from 'flipper-common';
|
||||
import * as fs_extra from 'fs-extra';
|
||||
import {getIdbInstallationInstructions} from './fb-stubs/idbInstallationInstructions';
|
||||
import {validateSelectedXcodeVersion} from './fb-stubs/validateSelectedXcodeVersion';
|
||||
|
||||
export function getHealthchecks(): FlipperDoctor.Healthchecks {
|
||||
return {
|
||||
@@ -196,6 +197,11 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks {
|
||||
message: `xcode-select has path of ${selectedXcode}, however this path does not exist on disk. Run "sudo xcode-select --switch" with a valid Xcode.app path.`,
|
||||
};
|
||||
}
|
||||
const validatedXcodeVersion =
|
||||
await validateSelectedXcodeVersion(selectedXcode);
|
||||
if (validatedXcodeVersion.hasProblem) {
|
||||
return validatedXcodeVersion;
|
||||
}
|
||||
return {
|
||||
hasProblem: false,
|
||||
message: `xcode-select has path of ${selectedXcode}.`,
|
||||
|
||||
Reference in New Issue
Block a user