diff --git a/desktop/doctor/package.json b/desktop/doctor/package.json index e264012c72e..e2d7abfb573 100644 --- a/desktop/doctor/package.json +++ b/desktop/doctor/package.json @@ -27,6 +27,7 @@ "author": "Facebook, Inc", "dependencies": { "envinfo": "^7.8.1", - "fb-watchman": "^2.0.1" + "fb-watchman": "^2.0.1", + "fs-extra": "^10.0.0" } } diff --git a/desktop/doctor/src/index.tsx b/desktop/doctor/src/index.tsx index b5661855ad6..f36f5c9161c 100644 --- a/desktop/doctor/src/index.tsx +++ b/desktop/doctor/src/index.tsx @@ -16,6 +16,7 @@ import * as watchman from 'fb-watchman'; import * as fs from 'fs'; import * as path from 'path'; import type {FlipperDoctor} from 'flipper-common'; +import * as fs_extra from 'fs-extra'; export function getHealthchecks(): FlipperDoctor.Healthchecks { return { @@ -188,6 +189,12 @@ export function getHealthchecks(): FlipperDoctor.Healthchecks { message: `xcode-select has no Xcode selected, You can select it using command "sudo xcode-select -switch Xcode.app".`, }; } + if ((await fs_extra.pathExists(selectedXcode)) == false) { + return { + hasProblem: true, + 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.`, + }; + } return { hasProblem: false, message: `xcode-select has path of ${selectedXcode}.`,